Socket
Socket
Sign inDemoInstall

is-negative-zero

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0 to 0.1.0

2

index.js
"use strict";
module.exports = function isNegativeZero(value) {
return Infinity / Number(value) < 0;
return Number(value) === 0 && Infinity / Number(value) < 0;
};
{
"name": "is-negative-zero",
"version": "0.0.0",
"version": "0.1.0",
"description": "Is this value negative zero? === will lie to you",

@@ -33,4 +33,4 @@ "author": "Jordan Harband",

"devDependencies": {
"tape": "~2.3.2",
"covert": "~0.3.0"
"tape": "~2.12.3",
"covert": "~0.4.0"
},

@@ -37,0 +37,0 @@ "testling": {

@@ -19,2 +19,3 @@ "use strict";

t.notOk(isNegativeZero(function () {}), 'function is not negative zero');
t.notOk(isNegativeZero(-1), '-1 is not negative zero');

@@ -21,0 +22,0 @@ t.end();

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