is-promise
Advanced tools
Comparing version 1.0.1 to 2.0.0
module.exports = isPromise; | ||
function isPromise(obj) { | ||
return obj && typeof obj.then === 'function'; | ||
} | ||
return obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; | ||
} |
{ | ||
"name": "is-promise", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Test whether an object looks like a promises-a+ promise", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ <a href="http://promises-aplus.github.com/promises-spec"><img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png" align="right" /></a> |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2611
4