🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

deneg-zero

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deneg-zero

Take your code from negative zero to zero in zero

5.0.0
latest
Source
npm
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

deneg-zero

NPM Tests Coverage Status Downloads License

Checks if an integer is negative zero, and converts to positive zero.

Install

npm install --save deneg-zero

Usage

import deneg from "deneg-zero";

deneg(-0);
//=> 0

deneg(+0);
//=> 0

deneg(12345);
//=> 12345

deneg(-4);
//=> -4

[-2, -1, -0, 0, 1, 2].map(deneg);
//=> [ -2, -1, 0, 0, 1, 2 ]

License

MIT © Philihp Busby

Keywords

negative

FAQs

Package last updated on 19 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts