Ox.zipObject: support (key, value)

This commit is contained in:
rlx 2016-02-18 10:59:37 +05:30
parent 08e16d073c
commit 064a28da3d

View file

@ -210,6 +210,8 @@ Ox.zipObject <f> Takes a keys and a values array, returns a new object
@*/
Ox.zipObject = function(keys, values) {
var object = {};
keys = Ox.makeArray(keys);
values = Ox.makeArray(values);
keys.forEach(function(key, index) {
object[key] = values[index];
});