6 lines
165 B
JavaScript
Executable File
6 lines
165 B
JavaScript
Executable File
module.exports = isPromise;
|
|
|
|
function isPromise(obj) {
|
|
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
|
|
}
|