is-promise
Advanced tools
Comparing version 2.0.0 to 2.1.0
module.exports = isPromise; | ||
function isPromise(obj) { | ||
return obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; | ||
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; | ||
} |
{ | ||
"name": "is-promise", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Test whether an object looks like a promises-a+ promise", | ||
@@ -19,2 +19,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
2614