diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-10-14 08:21:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 08:21:28 -0400 |
commit | efc6029e0099001c130060fcd9c93ea83f2d727b (patch) | |
tree | 41517a2754036edcab40274347c27440ac67c4ba | |
parent | 037e2f6ed7997332389f12d105471de3d6ea6a45 (diff) | |
parent | 4eb1707934a52b40faf71143ec7c57739a872ea5 (diff) | |
download | async-efc6029e0099001c130060fcd9c93ea83f2d727b.tar.gz |
Merge pull request #1304 from mikermcneil/patch-1
docs: fix typo in expected result for`mapValues()`
-rw-r--r-- | lib/mapValues.js | 7 | ||||
-rw-r--r-- | lib/mapValuesLimit.js | 5 | ||||
-rw-r--r-- | lib/mapValuesSeries.js | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/mapValues.js b/lib/mapValues.js index a0a9470..afc43f4 100644 --- a/lib/mapValues.js +++ b/lib/mapValues.js @@ -26,8 +26,9 @@ import doLimit from './internal/doLimit'; * called once it has completed with an error (which can be `null`) and a * transformed value. Invoked with (value, key, callback). * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `obj`. Invoked with (err, result). + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). * @example * * async.mapValues({ @@ -37,7 +38,7 @@ import doLimit from './internal/doLimit'; * }, function (file, key, callback) { * fs.stat(file, callback); * }, function(err, result) { - * // results is now a map of stats for each file, e.g. + * // result is now a map of stats for each file, e.g. * // { * // f1: [stats for file1], * // f2: [stats for file2], diff --git a/lib/mapValuesLimit.js b/lib/mapValuesLimit.js index f6e72ff..6c9fe06 100644 --- a/lib/mapValuesLimit.js +++ b/lib/mapValuesLimit.js @@ -20,8 +20,9 @@ import once from './internal/once'; * once it has completed with an error (which can be `null`) and a * transformed value. Invoked with (value, key, callback). * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an object of the - * transformed values from the `obj`. Invoked with (err, result). + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). */ export default function mapValuesLimit(obj, limit, iteratee, callback) { callback = once(callback || noop); diff --git a/lib/mapValuesSeries.js b/lib/mapValuesSeries.js index b97fcd1..c1530c2 100644 --- a/lib/mapValuesSeries.js +++ b/lib/mapValuesSeries.js @@ -16,7 +16,8 @@ import doLimit from './internal/doLimit'; * once it has completed with an error (which can be `null`) and a * transformed value. Invoked with (value, key, callback). * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an object of the - * transformed values from the `obj`. Invoked with (err, result). + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). */ export default doLimit(mapValuesLimit, 1); |