1.0.2 • Published 9 years ago

change-keys v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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.

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago