challenge-algorithms-v2.0-u.../node_modules/yargs/build/lib/utils/is-promise.js

6 lines
155 B
JavaScript
Raw Permalink Normal View History

export function isPromise(maybePromise) {
return (!!maybePromise &&
!!maybePromise.then &&
typeof maybePromise.then === 'function');
}