aswi2020vldc-gitlab/templetes/node_modules/p-is-promise/index.js @ 0b434236
1 | 3a515b92 | cagy | 'use strict'; |
---|---|---|---|
2 | |||
3 | const isPromise = input => ( |
||
4 | input instanceof Promise || |
||
5 | (
|
||
6 | input !== null && |
||
7 | typeof input === 'object' && |
||
8 | typeof input.then === 'function' && |
||
9 | typeof input.catch === 'function' |
||
10 | )
|
||
11 | );
|
||
12 | |||
13 | module.exports = isPromise; |
||
14 | // TODO: Remove this for the next major release
|
||
15 | module.exports.default = isPromise; |