JSPM

modify-values

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4309862
  • Score
    100M100P100Q216288F
  • License MIT

Modify the values of an object

Package Exports

  • modify-values

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (modify-values) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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