Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/is-bluebird/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // --------------------
// is-bluebird module
// --------------------
// exports
/**
* Identifies whether input is a bluebird promise.
* @param {*} promise - Input to be tested
* @returns {boolean} - true if is a bluebird promise, false if not
*/
var isBluebird = function(promise) {
return isObject(promise) && isBluebird.ctor(promise.constructor);
};
/**
* Identifies whether input is a bluebird promise constructor.
* @param {*} Promise - Input to be tested
* @returns {boolean} - true if is bluebird promise constructor, false if not
*/
isBluebird.ctor = function(Promise) {
return typeof Promise == 'function' && !!Promise.prototype && typeof Promise.prototype._addCallbacks == 'function';
};
/**
* Identifies whether input is a bluebird v2 promise.
* @param {*} promise - Input to be tested
* @returns {boolean} - true if is a bluebird v2 promise, false if not
*/
isBluebird.v2 = function(promise) {
return isObject(promise) && isBluebird.v2.ctor(promise.constructor);
};
/**
* Identifies whether input is bluebird v2 promise constructor.
* @alias isBluebird.ctor.v2
*
* @param {*} promise - Input to be tested
* @returns {boolean} - true if is a bluebird v2 promise, false if not
*/
isBluebird.v2.ctor = function(Promise) {
return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 6;
};
isBluebird.ctor.v2 = isBluebird.v2.ctor;
/**
* Identifies whether input is a bluebird v3 promise.
* @param {*} promise - Input to be tested
* @returns {boolean} - true if is a bluebird v3 promise, false if not
*/
isBluebird.v3 = function(promise) {
return isObject(promise) && isBluebird.v3.ctor(promise.constructor);
};
/**
* Identifies whether input is bluebird v3 promise constructor.
* @alias isBluebird.ctor.v3
*
* @param {*} promise - Input to be tested
* @returns {boolean} - true if is a bluebird v3 promise, false if not
*/
isBluebird.v3.ctor = function(Promise) {
return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 5;
};
isBluebird.ctor.v3 = isBluebird.v3.ctor;
/**
* Check if input is an object.
* @param {*} obj - Input to be tested
* @returns {boolean} - true if is an object, false if not
*/
function isObject(obj) {
return !!obj && typeof obj == 'object';
}
// export isBluebird
module.exports = isBluebird;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]-- |