Created
March 8, 2015 17:15
-
-
Save yuchi/f84762a3743c117f2938 to your computer and use it in GitHub Desktop.
Revisions
-
yuchi created this gist
Mar 8, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ var Promise = require('bluebird'); function provider(param) { // questa funzione ritorna una promessa } // Tutte o il primo errore Promise.all([ 'some', 'different', 'urls' ].map(provider)); // Un oggetto { value(), reason() } per ogni promessa Promise.settle([ 'some', 'different', 'urls' ].map(provider));