This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/object/mapKeys.mjs
T

13 lines
310 B
JavaScript

function mapKeys(object, getNewKey) {
const result = {};
const keys = Object.keys(object);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const value = object[key];
result[getNewKey(value, key, object)] = value;
}
return result;
}
export { mapKeys };