is-negative-zero
Advanced tools
Comparing version 0.0.0 to 0.1.0
"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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
5728
32
0