Bones/node_modules/zip-object
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00
..
test Template Upload 2017-05-17 13:45:25 -04:00
.npmignore Template Upload 2017-05-17 13:45:25 -04:00
index.js Template Upload 2017-05-17 13:45:25 -04:00
package.json Template Upload 2017-05-17 13:45:25 -04:00
README.md Template Upload 2017-05-17 13:45:25 -04:00

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