Socket
Socket
Sign inDemoInstall

is-promise

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

4

index.js
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc