summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolan McMahon <caolan@caolanmcmahon.com>2012-07-19 09:24:32 -0700
committerCaolan McMahon <caolan@caolanmcmahon.com>2012-07-19 09:24:32 -0700
commit3623c84443985d64034fd48250d706f2a4987e7c (patch)
tree12a4b7328ffa54b008c865e55658e235462417b6
parent4351b56b951a193052df162f531d386b50ccdccc (diff)
parent16a4218c7c1b676299b08d77d0bb12cca890f259 (diff)
downloadasync-3623c84443985d64034fd48250d706f2a4987e7c.tar.gz
Merge pull request #149 from aadamowski/master
Issue 122 - specify arguments require by callbacks in the documentation
-rw-r--r--README.md18
1 files changed, 13 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1bbbc47..92f7ffb 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,9 @@ __Arguments__
* arr - An array to iterate over.
* iterator(item, callback) - A function to apply to each item in the array.
- The iterator is passed a callback which must be called once it has completed.
+ The iterator is passed a callback(err) which must be called once it has completed.
+ If no error has occured, the callback should be run without arguments or
+ with an explicit null argument.
* callback(err) - A callback which is called after all the iterator functions
have finished, or an error has occurred.
@@ -157,6 +159,8 @@ __Arguments__
* limit - How many items should be in each batch.
* iterator(item, callback) - A function to apply to each item in the array.
The iterator is passed a callback which must be called once it has completed.
+ If no error has occured, the callback should be run without arguments or
+ with an explicit null argument.
* callback(err) - A callback which is called after all the iterator functions
have finished, or an error has occurred.
@@ -228,7 +232,8 @@ __Arguments__
* arr - An array to iterate over.
* iterator(item, callback) - A truth test to apply to each item in the array.
- The iterator is passed a callback which must be called once it has completed.
+ The iterator is passed a callback which must be called with a boolean argument
+ once it has completed.
* callback(results) - A callback which is called after all the iterator
functions have finished.
@@ -330,7 +335,8 @@ __Arguments__
* arr - An array to iterate over.
* iterator(item, callback) - A truth test to apply to each item in the array.
- The iterator is passed a callback which must be called once it has completed.
+ The iterator is passed a callback which must be called with a boolean argument
+ once it has completed.
* callback(result) - A callback which is called as soon as any iterator returns
true, or after all the iterator functions have finished. Result will be
the first item in the array that passes the truth test (iterator) or the
@@ -398,7 +404,8 @@ __Arguments__
* arr - An array to iterate over.
* iterator(item, callback) - A truth test to apply to each item in the array.
- The iterator is passed a callback which must be called once it has completed.
+ The iterator is passed a callback which must be called with a boolean argument
+ once it has completed.
* callback(result) - A callback which is called as soon as any iterator returns
true, or after all the iterator functions have finished. Result will be
either true or false depending on the values of the async tests.
@@ -425,7 +432,8 @@ __Arguments__
* arr - An array to iterate over.
* iterator(item, callback) - A truth test to apply to each item in the array.
- The iterator is passed a callback which must be called once it has completed.
+ The iterator is passed a callback which must be called with a boolean argument
+ once it has completed.
* callback(result) - A callback which is called after all the iterator
functions have finished. Result will be either true or false depending on
the values of the async tests.