Last active
November 7, 2017 02:14
-
-
Save Elevista/bf45803adff83434c09ae25eb4d45b6f to your computer and use it in GitHub Desktop.
ES6-Defer
This file contains hidden or 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
export function Deferred () { | |
this.promise = new Promise((resolve, reject) => Object.assign(this, {resolve, reject})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment