NuGet Package Manager

    invert-object

    0.0.0 • Public • Published

    invert-object

    Usage

    Invert an object so that keys becomes values and values become keys. Duplicate values in input is allowed by puttin all keys in arrays.

    Example

     
    var assert = require('assert')
     
      , invertObject = require('invert-object')
     
      , inverted = invertObject({foo: '1', bar: 1})
     
    assert.deepEqual(inverted, {1: ['foo', 'bar']})
     

    Keywords

    none

    Install

    npm i invert-object

    DownloadsWeekly Downloads

    4

    Version

    0.0.0

    License

    none

    Last publish

    Collaborators

    • kesla