Skip to content

Instantly share code, notes, and snippets.

@dimebt
Last active January 30, 2019 16:05
Show Gist options
  • Select an option

  • Save dimebt/280866b501fa30aa17d2cca028ecdcf3 to your computer and use it in GitHub Desktop.

Select an option

Save dimebt/280866b501fa30aa17d2cca028ecdcf3 to your computer and use it in GitHub Desktop.
firstly {
promise1()
}.then {
promise2()
}.then {
promise3()
}.ensure {
// something that should happen whatever the outcome
}.done {
// all promises are resolved
// handle final logic here
}.catch {
// handle error here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment