1
0
Fork 0
forked from 0x2620/oxjs

remove Ox.each, , $.extend, $.map and $.merge

This commit is contained in:
rolux 2011-09-17 20:36:09 +02:00
commit 4cc754a28d
35 changed files with 104 additions and 131 deletions

View file

@ -483,30 +483,6 @@ Ox.count = function(arr) {
return obj;
};
//@ Ox.each <f> (deprecated)
Ox.each = function(obj, fn) {
// fixme: deprecate!
/*
Ox.each() works for arrays, objects and strings,
like $.each(), unlike [].forEach()
>>> Ox.each([0, 1, 2], function(i, v) {})
[0, 1, 2]
>>> Ox.each({a: 1, b: 2, c: 3}, function(k, v) {}).a
1
>>> Ox.each('foo', function(i, v) {})
'foo'
*/
var i, isArray = Ox.isArray(obj);
for (i in obj) {
i = isArray ? parseInt(i) : i;
// fixme: should be (v, k), like [].forEach()
if (fn(i, obj[i]) === false) {
break;
}
}
return obj;
};
/*@
Ox.every <f> Tests if every element of a collection satisfies a given condition
Unlike <code>[].every()</code>, <code>Ox.every()</code> works for arrays,