1.0.2 • Published 9 years ago

obj-invert v1.0.2

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

obj-invert Build Status

Swap an object's keys with its values

Install

$ npm install --save obj-invert

Usage

var invert = require('obj-invert')

invert({foo: 'bar'})
//=> {bar: 'foo'}

API

invert(obj) -> object

Returns a new object with the key/value pairs from obj swapped.

obj

Required
Type: object

An object to invert. obj will not be modified.

License

MIT © Ben Drucker

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago