I just published a new version (0.1.3) that makes it easier to deal with mulitple results callback. You don't need to write a wrapper any more; you just get the resutls as an array. So your example becomes:
var galaxy = require('galaxy'); var fs = galaxy.star(require('fs')); var get = galaxy.star(require('request').get); function* main() { var contents = yield fs.readFile('idList.json', 'utf8'); yield contents.split('\n').forEachStar(function*(id) { var result = yield get('http://www.example.com?id='+id); console.log("body=" + result[1]); }); }; galaxy.unstar(main)(function(err, result) { if (err) throw err; console.log('done'); }); -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.