Skip to content

Instantly share code, notes, and snippets.

@robwormald
Created June 13, 2014 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save robwormald/eb45a0aed4dc42c73096 to your computer and use it in GitHub Desktop.
Save robwormald/eb45a0aed4dc42c73096 to your computer and use it in GitHub Desktop.
//opt 1
SomeService.getStuff().then(function(stuff){
return SomeService.manipulateStuff(stuff);
}).then(function(manipulatedStuff){
//do stuff...
});
//opt 2
SomeService.getStuff().then(SomeService.manipulateStuff).then(function(manipulatedStuff){
//do stuff...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment