Comparing version 0.2.1 to 0.2.2
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40223
130