source: imaps-frontend/node_modules/is-negative-zero/README.md@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.2 KB
Line 
1# is-negative-zero <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][deps-svg]][deps-url]
6[![dev dependency status][dev-deps-svg]][dev-deps-url]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][npm-badge-png]][package-url]
11
12Is this value negative zero? === will lie to you.
13
14## Example
15
16```js
17var isNegativeZero = require('is-negative-zero');
18var assert = require('assert');
19
20assert.notOk(isNegativeZero(undefined));
21assert.notOk(isNegativeZero(null));
22assert.notOk(isNegativeZero(false));
23assert.notOk(isNegativeZero(true));
24assert.notOk(isNegativeZero(0));
25assert.notOk(isNegativeZero(42));
26assert.notOk(isNegativeZero(Infinity));
27assert.notOk(isNegativeZero(-Infinity));
28assert.notOk(isNegativeZero(NaN));
29assert.notOk(isNegativeZero('foo'));
30assert.notOk(isNegativeZero(function () {}));
31assert.notOk(isNegativeZero([]));
32assert.notOk(isNegativeZero({}));
33
34assert.ok(isNegativeZero(-0));
35```
36
37## Tests
38Simply clone the repo, `npm install`, and run `npm test`
39
40[package-url]: https://npmjs.org/package/is-negative-zero
41[npm-version-svg]: https://versionbadg.es/inspect-js/is-negative-zero.svg
42[deps-svg]: https://david-dm.org/inspect-js/is-negative-zero.svg
43[deps-url]: https://david-dm.org/inspect-js/is-negative-zero
44[dev-deps-svg]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg
45[dev-deps-url]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies
46[npm-badge-png]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true
47[license-image]: https://img.shields.io/npm/l/is-negative-zero.svg
48[license-url]: LICENSE
49[downloads-image]: https://img.shields.io/npm/dm/is-negative-zero.svg
50[downloads-url]: https://npm-stat.com/charts.html?package=is-negative-zero
51[codecov-image]: https://codecov.io/gh/inspect-js/is-negative-zero/branch/main/graphs/badge.svg
52[codecov-url]: https://app.codecov.io/gh/inspect-js/is-negative-zero/
53[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-negative-zero
54[actions-url]: https://github.com/inspect-js/is-negative-zero/actions
Note: See TracBrowser for help on using the repository browser.