index.mjs 151 B

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