Created
May 14, 2017 21:26
-
-
Save max-lt/d3fe0f958dcf354470a08fe0a25f048a to your computer and use it in GitHub Desktop.
Deferred promise (es6)
This file contains 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 characters
function Deferred() { | |
this.promise = new Promise((resolve, reject) => { | |
this.resolve = resolve; | |
this.reject = reject; | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment