o-invert

1.0.0 • Public • Published

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

/o-invert/

    Package Sidebar

    Install

    npm i o-invert

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • vikramcse