index.js 181 B

12345678910
  1. 'use strict';
  2. module.exports = x => (
  3. x instanceof Promise ||
  4. (
  5. x !== null &&
  6. typeof x === 'object' &&
  7. typeof x.then === 'function' &&
  8. typeof x.catch === 'function'
  9. )
  10. );