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.2 to 0.2.3

6

index.js

@@ -177,3 +177,3 @@

is.null = function (value) {
is['null'] = function (value) {
return value === null;

@@ -296,3 +296,3 @@ };

is.false = function (value) {
is['false'] = function (value) {
return is.boolean(value) && (value === false || value.valueOf() === false);

@@ -310,3 +310,3 @@ };

is.true = function (value) {
is['true'] = function (value) {
return is.boolean(value) && (value === true || value.valueOf() === true);

@@ -313,0 +313,0 @@ };

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

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

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

@@ -30,3 +30,3 @@ # is

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

@@ -48,4 +48,4 @@

- is.boolean (value)
- is.false (value)
- is.true (value)
- is.false (value) - deprecated, because in ES3 browsers, "false" is a reserved word
- is.true (value) - deprecated, because in ES3 browsers, "true" is a reserved word

@@ -52,0 +52,0 @@ ### date

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

test('is.null', function (t) {
t.true(is.null(null), 'null is null');
t.false(is.null(undefined), 'undefined is not null');
t.false(is.null({}), 'object is not null');
var isNull = is['null'];
t.true(isNull(null), 'null is null');
t.false(isNull(undefined), 'undefined is not null');
t.false(isNull({}), 'object is not null');
t.end();

@@ -151,8 +152,9 @@ });

test('is.false', function (t) {
t.true(is.false(false), 'false is false');
t.true(is.false(new Boolean(false)), 'object false is false');
t.false(is.false(true), 'true is not false');
t.false(is.false(), 'undefined is not false');
t.false(is.false(null), 'null is not false');
t.false(is.false(''), 'empty string is not false');
var isFalse = is['false'];
t.true(isFalse(false), 'false is false');
t.true(isFalse(new Boolean(false)), 'object false is false');
t.false(isFalse(true), 'true is not false');
t.false(isFalse(), 'undefined is not false');
t.false(isFalse(null), 'null is not false');
t.false(isFalse(''), 'empty string is not false');
t.end();

@@ -162,8 +164,9 @@ });

test('is.true', function (t) {
t.true(is.true(true), 'true is true');
t.true(is.true(new Boolean(true)), 'object true is true');
t.false(is.true(false), 'false is not true');
t.false(is.true(), 'undefined is not true');
t.false(is.true(null), 'null is not true');
t.false(is.true(''), 'empty string is not true');
var isTrue = is['true'];
t.true(isTrue(true), 'true is true');
t.true(isTrue(new Boolean(true)), 'object true is true');
t.false(isTrue(false), 'false is not true');
t.false(isTrue(), 'undefined is not true');
t.false(isTrue(null), 'null is not true');
t.false(isTrue(''), 'empty string is not true');
t.end();

@@ -170,0 +173,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