Distopico Vegan 9e639edc8d | 6 years ago | |
---|---|---|
.. | ||
index.js | 6 years ago | |
license | 6 years ago | |
package.json | 6 years ago | |
readme.md | 6 years ago |
Modify the values of an object
$ npm install --save modify-values
var modifyValues = require('modify-values');
modifyValues({foo: 'UNICORN'}, function (value, key) {
return value.toLowerCase();
});
//=> {foo: 'unicorn'}
Modifies the values and returns a new object.
Required
Type: object
Required
Type: function
Gets the value and key for each item and is expected to return the new value.
See modify-keys
for modifying the keys of an object.
MIT © Sindre Sorhus