index.mjs 151 B

1234
  1. export default function isPromise(obj) {
  2. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  3. }