site/node_modules/yargs/build/lib/utils/is-promise.js
2024-10-14 08:09:33 +02:00

6 lines
155 B
JavaScript

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