summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike McNeil <mikermcneil@users.noreply.github.com>2016-10-13 00:02:29 -0500
committerGitHub <noreply@github.com>2016-10-13 00:02:29 -0500
commit7a252d05bca5e1cd8d6bb6ce2a70942806fe1a2f (patch)
treea902d584da255dbbff1bab3e3f9b3771d802d704
parent037e2f6ed7997332389f12d105471de3d6ea6a45 (diff)
downloadasync-7a252d05bca5e1cd8d6bb6ce2a70942806fe1a2f.tar.gz
docs: fix copy/paste typo
Replace "array" with "object" (looks like it was likely a copy/paste error from when these docs were originally brought over from `.map()`), and rephrase the sentence accordingly. I also normalized an occurrence of "result" vs. "results" to match. > *NOTE:* I did not yet go through and do the same to `.mapValuesLimit()` and `.mapValuesSeries()` in this commit. I'm happy to take care of that in this PR, but it's purely a matter of copy and pasting the relevant comments.
-rw-r--r--lib/mapValues.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mapValues.js b/lib/mapValues.js
index a0a9470..c3daa56 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 result 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],