$ gnpm install modify-values
Modify the values of an object
$ npm install modify-values
import modifyValues from 'modify-values';
modifyValues({foo: 'UNICORN'}, (value, key) => value.toLowerCase());
//=> {foo: 'unicorn'}
Modifies the values and returns a new object.
Type: object
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.
Copyright 2013 - present © cnpmjs.org | Home |