Skip to content

Instantly share code, notes, and snippets.

@laurencedorman
Created May 25, 2016 08:59
Show Gist options
  • Save laurencedorman/c3990a4433d89dda3380dd9d9f832df8 to your computer and use it in GitHub Desktop.
Save laurencedorman/c3990a4433d89dda3380dd9d9f832df8 to your computer and use it in GitHub Desktop.
Start a promise chain from a Boolean
var p = Promise[(someCondition)?"resolve":"reject"]();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment