New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

change-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

change-keys

create a new object with modified keys from the original

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

change-keys

a simple utility to get a new object with transformed property names.

NPM

##Usage

On a single object:

changeKeys({ x: 25, y: 0, opacity: 0.5 }, { x: 'left', y: 'top' })
//=> { left: 25, y: 0, opacity: 0.5 }

On a collection of objects:

changeKeys([
    { x: 5, y: 5, o: 0.5 },
    { x: 10, y: 10, o: 0.4 }
],  { x: 'left', y: 'top' });
//=> [{ left: 5, top: 5, o: 0.5 },{ left: 10, top: 10, o: 0.4 }]

##License

MIT, see LICENSE.md for details.

Keywords

objects

FAQs

Package last updated on 12 Apr 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