MCPcopy Create free account
hub / github.com/hoothin/UserScripts / Promise

Function Promise

Picviewer CE+/dist.user.js:4560–4570  ·  view source on GitHub ↗
(resolver)

Source from the content-addressed store, hash-verified

4558module.exports = Promise;
4559
4560function Promise(resolver) {
4561 if (typeof resolver !== 'function') {
4562 throw new TypeError('resolver must be a function');
4563 }
4564 this.state = PENDING;
4565 this.queue = [];
4566 this.outcome = void 0;
4567 if (resolver !== INTERNAL) {
4568 safelyResolveThenable(this, resolver);
4569 }
4570}
4571
4572Promise.prototype["finally"] = function (callback) {
4573 if (typeof callback !== 'function') {

Callers

nothing calls this directly

Calls 1

safelyResolveThenableFunction · 0.70

Tested by

no test coverage detected