Skip to content

Instantly share code, notes, and snippets.

@getify
Forked from smockle/promises.js
Last active August 29, 2015 14:11
Show Gist options
  • Save getify/1fa1fed03d9ae9722903 to your computer and use it in GitHub Desktop.
Save getify/1fa1fed03d9ae9722903 to your computer and use it in GitHub Desktop.
// if you convert to everything returning asynquence sequences
ASQ( get("/api/google/sheets/resources") )
.val( JSON.parse )
.seq( handlebar.bind(null,"#template", "#output") )
.seq( pourover )
.seq( linkify )
.or(function(err) {
console.error(err);
});
// if you leave everything returning promises, but use asynquence
ASQ()
.promise( get("/api/google/sheets/resources") )
.val( JSON.parse )
.promise( handlebar.bind(null,"#template", "#output") )
.promise( pourover )
.promise( linkify )
.or(function(err) {
console.error(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment