File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2828 "inherits" : " 2.0.3" ,
2929 "is-arguments" : " ^1.0.4" ,
3030 "is-generator-function" : " ^1.0.7" ,
31- "is-promise" : " ^2.1.0" ,
3231 "object.entries" : " ^1.1.0" ,
3332 "safe-buffer" : " ^5.1.2"
3433 },
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ var isBuffer = require('./isBuffer');
77
88var isArgumentsObject = require ( 'is-arguments' ) ;
99var isGeneratorFunction = require ( 'is-generator-function' ) ;
10- var isPromise = require ( 'is-promise' ) ;
1110
1211function uncurryThis ( f ) {
1312 return f . call . bind ( f ) ;
@@ -59,6 +58,22 @@ exports.isArgumentsObject = isArgumentsObject;
5958
6059exports . isGeneratorFunction = isGeneratorFunction ;
6160
61+ // Taken from here and modified for better browser support
62+ // https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js
63+ function isPromise ( input ) {
64+ return (
65+ (
66+ typeof Promise !== 'undefined' &&
67+ input instanceof Promise
68+ ) ||
69+ (
70+ input !== null &&
71+ typeof input === 'object' &&
72+ typeof input . then === 'function' &&
73+ typeof input . catch === 'function'
74+ )
75+ ) ;
76+ }
6277exports . isPromise = isPromise ;
6378
6479function isArrayBufferView ( value ) {
You can’t perform that action at this time.
0 commit comments