update docs

This commit is contained in:
rolux 2012-05-23 17:43:32 +02:00
parent 65fd7d4dd0
commit 9137607045

View file

@ -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; })