Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

index.js

@@ -156,3 +156,3 @@

/**
* is.instanceof
* is.instance
* Test if `value` is an instance of `constructor`.

@@ -165,3 +165,3 @@ *

is.instanceof = function (value, constructor) {
is.instance = is['instanceof'] = function (value, constructor) {
return value instanceof constructor;

@@ -168,0 +168,0 @@ };

@@ -26,3 +26,3 @@ {

"main": "index.js",
"version": "0.2.1",
"version": "0.2.2",
"scripts": {

@@ -29,0 +29,0 @@ "test": "node test/index.js"

@@ -28,3 +28,4 @@ # is

- is.hosted (value, host)
- is.instanceof (value, constructor)
- is.instance (value, constructor)
- is.instanceof (value, constructor) - deprecated, because in ES3 browsers, "instanceof" is a reserved word
- is.null (value)

@@ -31,0 +32,0 @@ - is.undefined (value)

@@ -81,6 +81,6 @@ var test = require('tape');

test('is.instanceof', function (t) {
t.true(is.instanceof(new Date(), Date), 'new Date is instanceof Date');
test('is.instance', function (t) {
t.true(is.instance(new Date(), Date), 'new Date is instanceof Date');
var F = function () {};
t.true(is.instanceof(new F(), F), 'new constructor is instanceof constructor');
t.true(is.instance(new F(), F), 'new constructor is instanceof constructor');
t.end();

@@ -87,0 +87,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc