Skip to content

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

License

Notifications You must be signed in to change notification settings

vikramcse/o-invert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published