Bones/node_modules/zip-object/index.js

17 lines
284 B
JavaScript
Raw Normal View History

2017-05-17 13:45:25 -04:00
var zipObject = function (keys, values) {
if (arguments.length == 1) {
values = keys[1];
keys = keys[0];
}
var result = {};
var i = 0;
for (i; i < keys.length; i += 1) {
result[keys[i]] = values[i];
}
return result;
};
module.exports = zipObject;