4 ms·
A reminder that LazyPromises are trivial to implement: function LazyPromise(executor) { this.then = (resolve, reject) => new Promise(executor).t
by reaktivo 9y ago
A reminder that LazyPromises are trivial to implement:
function LazyPromise(executor) {
this.then = (resolve, reject) => new
Promise(executor).then(resolve, reject);
this.catch = (resolve, reject) => new
Promise(executor).catch(reject);
}