index.js 165 B

12345
  1. module.exports = isPromise;
  2. function isPromise(obj) {
  3. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  4. }