update tests

This commit is contained in:
rolux 2012-05-25 16:25:35 +02:00
parent aebd6aacff
commit 4c2199a820

View file

@ -81,7 +81,7 @@ Ox.count = function(collection) {
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,
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 <f> Transforms the values of an array, object or string
Unlike <code>[].map()</code>, <code>Ox.map()</code> 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(); })