is-promise.js 147 Bytes
Newer Older
1 2 3
module.exports = function isPromise (maybePromise) {
  return !!maybePromise && !!maybePromise.then && (typeof maybePromise.then === 'function')
}