zip-object

0.1.0 • Public • Published

zip-object

Create an object from from arrays of keys and values. (Inspired by lodash's _.zipObject)

Install

npm install zip-object --save

Usage

Either takes two arrays or an array of arrays as the argument(s).

var zipObject = require('zip-object');
var zipped = zipObject(['key1', 'key2'], ['value1', 'value2']);
 
console.log(zipped.key1); // outputs 'value1'
console.log(zipped.key2); // outputs 'value2'

Run Tests

npm install
npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    35,003
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    35,003

Package Sidebar

Install

npm i zip-object

Weekly Downloads

34,066

Version

0.1.0

License

MIT

Last publish

Collaborators

  • scottcorgan