1.0.0 • Published 8 years ago

o-invert v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

o-invert

Returns a copy of object with inverted keys and values of an object

Install

$ npm install --save o-invert

The object's all values must be unique

Example

var invert = require('o-invert');
console.log(invert({name: "Vikram", surname: "Jadhav"}));
// -> { Vikram: 'name', Jadhav: 'surname' }

require('o-invert')(object)

Arguments:

  • object: An object that to be inverted

Returns: Returns a copy of object with inverted keys and values of an object

License

© 2016 Vikram Jadhav. MIT License