zip-object
Create an object from from arrays of keys and values
Last updated 13 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install zip-object 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.0                                ...           latest (13 years ago)

1 Versions

  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE