diff options
author | Leonardo Gatica <lgatica@protonmail.com> | 2016-02-26 11:42:56 -0300 |
---|---|---|
committer | Leonardo Gatica <lgatica@protonmail.com> | 2016-02-26 11:42:56 -0300 |
commit | 0bb98fc5b34d8dadade6265dbe48b41127e56ee5 (patch) | |
tree | c6439e5760766041b886edb70c705fe50086e01f | |
parent | a8c285ba7fbc7084c25c3af9b9eeff1e9b63bd62 (diff) | |
download | async-0bb98fc5b34d8dadade6265dbe48b41127e56ee5.tar.gz |
Fix async.filter example
-rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -36,9 +36,9 @@ async.map(['file1','file2','file3'], fs.stat, function(err, results){ async.filter(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(null, !err) + callback(!err) }); -}, function(err, results){ +}, function(results){ // results now equals an array of the existing files }); @@ -416,9 +416,9 @@ __Example__ ```js async.filter(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(null, !err) + callback(!err) }); -}, function(err, results){ +}, function(results){ // results now equals an array of the existing files }); ``` |