Opal-Estate-Pro/node_modules/is-promise/index.js
2019-09-13 11:27:52 +07:00

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';
}