Skip to content

Instantly share code, notes, and snippets.

@curtislacy
Created February 1, 2013 03:52
Show Gist options
  • Save curtislacy/4689054 to your computer and use it in GitHub Desktop.
Save curtislacy/4689054 to your computer and use it in GitHub Desktop.
Named callbacks appear to work fine.
async.map( ['A', 'B', 'C' ],
function( item, cb ) {
console.log( item );
cb( null, '' + item + item );
},
function( error, results ) {
console.log( 'results: ' + require( 'util' ).inspect( results ) );
});
async.map( ['A', 'B', 'C' ],
function it( item, cb ) {
console.log( item );
cb( null, '' + item + item );
},
function cb( error, results ) {
console.log( 'results: ' + require( 'util' ).inspect( results ) );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment