File: index.mjs

package info (click to toggle)
node-is-promise 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 124 kB
  • sloc: javascript: 61; makefile: 2
file content (3 lines) | stat: -rw-r--r-- 151 bytes parent folder | download
1
2
3
export default function isPromise(obj) {
  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}