\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/infraai.ai/frontend/node_modules/promise/setimmediate/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/infraai.ai/frontend/node_modules/promise/setimmediate/synchronous.js |
'use strict';
var Promise = require('./core.js');
module.exports = Promise;
Promise.enableSynchronous = function () {
Promise.prototype.isPending = function() {
return this.getState() == 0;
};
Promise.prototype.isFulfilled = function() {
return this.getState() == 1;
};
Promise.prototype.isRejected = function() {
return this.getState() == 2;
};
Promise.prototype.getValue = function () {
if (this._y === 3) {
return this._z.getValue();
}
if (!this.isFulfilled()) {
throw new Error('Cannot get a value of an unfulfilled promise.');
}
return this._z;
};
Promise.prototype.getReason = function () {
if (this._y === 3) {
return this._z.getReason();
}
if (!this.isRejected()) {
throw new Error('Cannot get a rejection reason of a non-rejected promise.');
}
return this._z;
};
Promise.prototype.getState = function () {
if (this._y === 3) {
return this._z.getState();
}
if (this._y === -1 || this._y === -2) {
return 0;
}
return this._y;
};
};
Promise.disableSynchronous = function() {
Promise.prototype.isPending = undefined;
Promise.prototype.isFulfilled = undefined;
Promise.prototype.isRejected = undefined;
Promise.prototype.getValue = undefined;
Promise.prototype.getReason = undefined;
Promise.prototype.getState = undefined;
};