Skip to content

Instantly share code, notes, and snippets.

@distracteddev
Created November 28, 2012 03:40
Show Gist options
  • Save distracteddev/4158886 to your computer and use it in GitHub Desktop.
Save distracteddev/4158886 to your computer and use it in GitHub Desktop.
example.js
iterator = function(message, callback) {
var userId = message.userId
client.user(userId, function(user) {
callback(null, user);
});
}
async.map(messages, iterator, function(err, mappedMessages) {
// hooray for async map.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment