MCPcopy Create free account
hub / github.com/node-config/node-config / isPromise

Method isPromise

lib/util.js:790–792  ·  view source on GitHub ↗

* Is the specified argument a javascript promise? * * @method isPromise * @param {unknown} obj An argument of any type. * @returns {obj is Promise} TRUE if the arg is a Promise, FALSE if not

(obj)

Source from the content-addressed store, hash-verified

788 * @returns {obj is Promise} TRUE if the arg is a Promise, FALSE if not
789 */
790 static isPromise(obj) {
791 return Object.prototype.toString.call(obj) === '[object Promise]';
792 }
793
794 /**
795 * Returns a string of flags for regular expression `re`.

Callers 3

_cloneMethod · 0.80
extendDeepMethod · 0.80
0-util.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected