update tests
This commit is contained in:
parent
aebd6aacff
commit
4c2199a820
1 changed files with 3 additions and 3 deletions
|
@ -81,7 +81,7 @@ Ox.count = function(collection) {
|
||||||
Ox.every <f> Tests if every element of a collection satisfies a given condition
|
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,
|
Unlike <code>[].every()</code>, <code>Ox.every()</code> works for arrays,
|
||||||
objects and strings.
|
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
|
true
|
||||||
> Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; })
|
> Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; })
|
||||||
false
|
false
|
||||||
|
@ -311,8 +311,8 @@ Ox.len = function(collection) {
|
||||||
Ox.map <f> Transforms the values of an array, object or string
|
Ox.map <f> Transforms the values of an array, object or string
|
||||||
Unlike <code>[].map()</code>, <code>Ox.map()</code> works for arrays,
|
Unlike <code>[].map()</code>, <code>Ox.map()</code> works for arrays,
|
||||||
objects and strings.
|
objects and strings.
|
||||||
> Ox.map([0, 0, 0], function(v, i) { return v == i; })
|
> Ox.map([2, 1, 0], function(v, i) { return v == i; })
|
||||||
[true, false, false]
|
[false, true, false]
|
||||||
> Ox.map({a: 'a', b: 'a', c: 'a'}, function(v, k) { return v == k; })
|
> Ox.map({a: 'a', b: 'a', c: 'a'}, function(v, k) { return v == k; })
|
||||||
{a: true, b: false, c: false}
|
{a: true, b: false, c: false}
|
||||||
> Ox.map('foo', function(v) { return v.toUpperCase(); })
|
> Ox.map('foo', function(v) { return v.toUpperCase(); })
|
||||||
|
|
Loading…
Reference in a new issue