pipio
Version:
Chain functions together and handle a complex workflow
13 lines (12 loc) • 398 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPromise = void 0;
/**
* Determine whether the given `promise` is a Promise.
*
* @param {*} promise
*
* @returns {Boolean}
*/
const isPromise = (promise) => promise instanceof Promise || typeof (promise === null || promise === void 0 ? void 0 : promise.then) === 'function';
exports.isPromise = isPromise;