modify-values

2.1.1last stable release 4 years ago
Complexity Score
Low
Open Issues
0
Dependent Projects
245
Weekly Downloadsglobal
3,069,070

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

modify-values

Modify the values of an object

Install

$ npm install modify-values

Usage

import modifyValues from 'modify-values';

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

API

modifyValues(object, transformer)

Modifies the values and returns a new object.

object

Type: object

transformer(value, key)

Type: Function

Gets the value and key for each item and is expected to return the new value.

Related

See modify-keys for modifying the keys of an object.

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
4.20
Test Coverage
No Data
Follows Semver
Yes
Github Stars
28
Dependenciestotal
3
DependenciesOutdated
3
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute modify-values in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install modify-values
Processing...
Done

5 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.