From 55c76942f9448656d73afa9642c16a6aeef2a3ab Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 2 Jun 2012 11:20:55 +0200 Subject: [PATCH] add fixme --- source/Ox/js/Collection.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index e8943035..ee57eb0a 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -523,6 +523,26 @@ Ox.sum = function(collection) { return ret; }; +/* FIXME: do we need this kind of zip functionality? + +Ox.arrayToObject = function(array, key) { + var ret = {}; + array.forEach(function(v) { + ret[v[key]] = v; + }); + return ret; +}; + +Ox.objectToArray = function(object, key) { + var ret = []; + Ox.forEach(object, function(v, k) { + ret.push(Ox.extend(v, key, k)); + }); + return ret +}; + +*/ + /*@ Ox.values Returns the values of a collection > Ox.values([1, 2, 3])