source: node_modules/es-toolkit/dist/object/mapValues.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 316 bytes
RevLine 
[a762898]1function mapValues(object, getNewValue) {
2 const result = {};
3 const keys = Object.keys(object);
4 for (let i = 0; i < keys.length; i++) {
5 const key = keys[i];
6 const value = object[key];
7 result[key] = getNewValue(value, key, object);
8 }
9 return result;
10}
11
12export { mapValues };
Note: See TracBrowser for help on using the repository browser.