UNPKG

pipio

Version:

Chain functions together and handle a complex workflow

9 lines (8 loc) 269 B
/** * Determine whether the given `promise` is a Promise. * * @param {*} promise * * @returns {Boolean} */ export const isPromise = (promise) => promise instanceof Promise || typeof (promise === null || promise === void 0 ? void 0 : promise.then) === 'function';