- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 20 Aug 2019 09:47:20 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 20 August 2019 16:47:44 UTC
domenic commented on this pull request. > @@ -157,11 +157,38 @@ exports.MakeSizeAlgorithmFromSizeFunction = size => { return chunk => size(chunk); }; -exports.PerformPromiseThen = (promise, onFulfilled, onRejected) => { +const originalPromise = Promise; +const originalPromiseThen = Promise.prototype.then; +const originalPromiseResolve = Promise.resolve; +const originalPromiseReject = Promise.reject; + +function CreatePromise(executor) { + return new originalPromise(executor); +} + +function PromiseResolve(value) { + return originalPromiseResolve.call(originalPromise, value); +} + +function PromiseReject(reason) { I agree with sticking with the promises guide names, and using lower case. After all, this is the reference implementation; the closer to the standard text it can be, the better. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/1010#discussion_r315795048
Received on Tuesday, 20 August 2019 16:47:44 UTC