management/front/dkha-web-sz-main/node_modules/is-promise/index.js

6 lines
165 B
JavaScript

module.exports = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}