Created
February 1, 2013 03:52
-
-
Save curtislacy/4689054 to your computer and use it in GitHub Desktop.
Named callbacks appear to work fine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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