update docs
This commit is contained in:
parent
65fd7d4dd0
commit
9137607045
1 changed files with 4 additions and 3 deletions
|
@ -149,6 +149,7 @@ Ox.find = function(arr, str) {
|
|||
};
|
||||
|
||||
/*@
|
||||
// FIXME: documentation is outdated!
|
||||
Ox.forEach <f> forEach loop
|
||||
<code>Ox.forEach()</code> loops over arrays, objects and strings.
|
||||
Returning <code>false</code> from the iterator function acts like a
|
||||
|
@ -159,7 +160,7 @@ Ox.forEach <f> forEach loop
|
|||
(collection, callback) <a|o|s> The collection
|
||||
(collection, callback, includePrototype) <a|o|s> The collection
|
||||
collection <a|o|s> An array, object or string
|
||||
callback <f> Callback function
|
||||
callback <f> Iterator function
|
||||
value <*> Value
|
||||
key <n|s> Key
|
||||
includePrototype <b|false> If true, include prototype properties
|
||||
|
@ -456,8 +457,8 @@ Ox.map <f> Transforms the values of an array, object or string
|
|||
[true, false, false]
|
||||
> Ox.map({a: 'a', b: 'a', c: 'a'}, function(v, k) { return v == k; })
|
||||
{a: true, b: false, c: false}
|
||||
> Ox.map("000", function(v, i) { return v == i; })
|
||||
[true, false, false]
|
||||
> Ox.map('foo', function(v) { return v.toUpperCase(); })
|
||||
'FOO'
|
||||
> Ox.map([0, 1, 2, 4], function(v, i) { return v ? i == v : null; })
|
||||
[true, true, false]
|
||||
> Ox.map([,], function(v, i) { return i; })
|
||||
|
|
Loading…
Reference in a new issue