Ox.zipObject: support (key, value)
This commit is contained in:
parent
08e16d073c
commit
064a28da3d
1 changed files with 2 additions and 0 deletions
|
@ -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];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue