You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 320B

123456789101112131415
  1. 'use strict';
  2. const isPromise = input => (
  3. input instanceof Promise ||
  4. (
  5. input !== null &&
  6. typeof input === 'object' &&
  7. typeof input.then === 'function' &&
  8. typeof input.catch === 'function'
  9. )
  10. );
  11. module.exports = isPromise;
  12. // TODO: Remove this for the next major release
  13. module.exports.default = isPromise;