Skip to content

Instantly share code, notes, and snippets.

@joepie91 joepie91/.js

Created Jul 19, 2015
What would you like to do?
Promise map (Bluebird)
var bhttp = require("bhttp");
var urls = [
"" // Ha ha, just kidding who uses Bing anyway :)
/* There's a faster shorthand for this, but for illustrative purposes, we'll just return the array here and pretend that it was generated by something else, somehow. */
return urls;
return bhttp.get(url);
return response.body;
/* Now `responseBodies` is an array of response bodies, one for each URL, in the original URL order. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.