README's demo code has wrong
See original GitHub issuehttps://github.com/caolan/async#autotasks-concurrency-callback
async.auto({
get_data: function(callback){
console.log('in get_data');
// async code to get some data
callback(null, 'data', 'converted to array');
},
make_folder: function(callback){
console.log('in make_folder');
// async code to create a directory to store a file in
// this is run at the same time as getting the data
callback(null, 'folder');
},
write_file: ['get_data', 'make_folder', function(results, callback){
console.log('in write_file', JSON.stringify(results));
// once there is some data and the directory exists,
// write the data to a file in the directory
callback(null, 'filename');
}],
email_link: ['write_file', function(results, callback){
console.log('in email_link', JSON.stringify(results));
// once the file is written let's email a link to it...
// results.write_file contains the filename returned by write_file.
callback(null, {'file':results.write_file, 'email':'user@example.com'});
}]
}, function(err, results) {
console.log('err = ', err);
console.log('results = ', results);
});
In this case, the write_file’s and email_link’s function should be function(callback, results){}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
[BUG] Code blocks are not properly rendered in the README ...
I'm using the same example as you have on your demo app README.md. This is the code I add to the readme file:...
Read more >Error Pages - ReadMe Documentation
Add an error code link to a doc page by selecting the page in your project dashboard, then selecting API Error in the...
Read more >README File – Everything you Need to Know - Great Learning
A README file is a text file that describes and launches a project. It comprises information that is frequently needed to grasp the...
Read more >How can I test what my readme.md file will look like before ...
Since VS Code is platform independent, this would work for Windows, Mac and Linux. To switch between views, press Ctrl+Shift+V in the editor....
Read more >How to Write a Good README File for Your GitHub Project
Between you and me, I created the account because I was told every developer should have one where they push their code. For...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From the readme : If a task function has no dependencies, it will only be passed a callback.
@code4funlnyx Thank you!