conventional-changelog-action/node_modules/modify-values
Conventional Changelog Action bf7e9cbfcd chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
..
index.js chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
license chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
package.json chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
readme.md chore(release): v3.1.1 2020-07-13 17:58:28 +00:00

readme.md

modify-values Build Status

Modify the values of an object

Install

$ npm install --save modify-values

Usage

var modifyValues = require('modify-values');

modifyValues({foo: 'UNICORN'}, function (value, key) {
	return value.toLowerCase();
});
//=> {foo: 'unicorn'}

API

modifyValues(input, modifier)

Modifies the values and returns a new object.

input

Required
Type: object

modifier(value, key)

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.

License

MIT © Sindre Sorhus