diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index 00c24514..d7848811 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -81,7 +81,7 @@ Ox.count = function(collection) { Ox.every Tests if every element of a collection satisfies a given condition Unlike [].every(), Ox.every() works for arrays, objects and strings. - > Ox.every([0, 1, 2], function(v, i) { return i == v; }) + > Ox.every([0, 1, 2], function(v, i) { return v == i; }) true > Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; }) false @@ -311,8 +311,8 @@ Ox.len = function(collection) { Ox.map Transforms the values of an array, object or string Unlike [].map(), Ox.map() works for arrays, objects and strings. - > Ox.map([0, 0, 0], function(v, i) { return v == i; }) - [true, false, false] + > Ox.map([2, 1, 0], function(v, i) { return v == i; }) + [false, true, false] > Ox.map({a: 'a', b: 'a', c: 'a'}, function(v, k) { return v == k; }) {a: true, b: false, c: false} > Ox.map('foo', function(v) { return v.toUpperCase(); })