diff options
author | charlierudolph <charles.rudolph@originate.com> | 2016-02-16 11:22:03 -0800 |
---|---|---|
committer | charlierudolph <charles.rudolph@originate.com> | 2016-02-16 11:22:03 -0800 |
commit | d611a47884f899a642b6582ef5b2766b1ad3f5de (patch) | |
tree | 728b621a8b178575e126f0ff0ca1e4c034e1b580 | |
parent | 10ac9e9514d2cd6c3cfe1a4bf6785bdb4e146ab0 (diff) | |
download | async-d611a47884f899a642b6582ef5b2766b1ad3f5de.tar.gz |
fix readme
-rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -36,7 +36,7 @@ async.map(['file1','file2','file3'], fs.stat, function(err, results){ async.filter(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(filepath, !err) + callback(null, !err) }); }, function(err, results){ // results now equals an array of the existing files @@ -416,7 +416,7 @@ __Example__ ```js async.filter(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(filepath, !err) + callback(null, !err) }); }, function(err, results){ // results now equals an array of the existing files @@ -519,7 +519,7 @@ __Example__ ```js async.detect(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(filepath, !err) + callback(null, !err) }); }, function(err, result){ // result now equals the first file in the list that exists @@ -607,7 +607,7 @@ __Example__ ```js async.some(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(filepath, !err) + callback(null, !err) }); }, function(err, result){ // if result is true then at least one of the files exists @@ -643,7 +643,7 @@ __Example__ ```js async.every(['file1','file2','file3'], function(filePath, callback) { fs.access(filePath, function(err) { - callback(filepath, !err) + callback(null, !err) }); }, function(err, result){ // if result is true then every file exists |