Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

modify-keys

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modify-keys

Modify the keys of an object

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

modify-keys Build Status

Modify the keys of an object

Install

$ npm install --save modify-keys

Usage

var modifyKeys = require('modify-keys');

modifyKeys({FOO: true, bAr: false}, function (key, value) {
	return key.toLowerCase();
});
//=> {foo: true, bar: false}

API

modifyKeys(input, modifier)

Modifies the keys and returns a new object.

input

Required
Type: object

modifier(key, value)

Required
Type: function

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

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

License

MIT © Sindre Sorhus

Keywords

object

FAQs

Package last updated on 25 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts