This commit is contained in:
2025-10-22 15:39:40 +08:00
commit b0b510fac1
2720 changed files with 415933 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
let generate = (items, suffix, f) => {
let out = {};
items.forEach(k => out[k + '-' + suffix] = f(k));
return out;
};
let prefixes = (obj, mappings) => {
const objMappings = {};
mappings.forEach(v => objMappings[v[0]] = v[1]);
return Object.assign(obj, objMappings);
};
module.exports = {
generate,
prefixes
};