Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis.Learn more
Socket
Socket

is-negative-zero

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

is-negative-zero

Is this value negative zero? === will lie to you

    2.0.2latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
25,346,150
increased by6.15%

Weekly downloads

Changelog

Source

v2.0.2 - 2021-12-10

Commits

Readme

Source

is-negative-zero Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value negative zero? === will lie to you.

Example

var isNegativeZero = require('is-negative-zero'); var assert = require('assert'); assert.notOk(isNegativeZero(undefined)); assert.notOk(isNegativeZero(null)); assert.notOk(isNegativeZero(false)); assert.notOk(isNegativeZero(true)); assert.notOk(isNegativeZero(0)); assert.notOk(isNegativeZero(42)); assert.notOk(isNegativeZero(Infinity)); assert.notOk(isNegativeZero(-Infinity)); assert.notOk(isNegativeZero(NaN)); assert.notOk(isNegativeZero('foo')); assert.notOk(isNegativeZero(function () {})); assert.notOk(isNegativeZero([])); assert.notOk(isNegativeZero({})); assert.ok(isNegativeZero(-0));

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

Last updated on 10 Dec 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
Socket SOC 2 Logo

Product

  • Package Issues
  • 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