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
Mon May 9 15:36:45 UTC 2016 |
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
// Implementation | |
class Promise {} | |
// Test Code | |
const adapter = { | |
deferred() { | |
const pending = {}; | |
pending.promise = new Promise((resolver, reject) => { | |
pending.resolve = resolver; | |
pending.reject = reject; |