source: imaps-frontend/node_modules/is-number-object/README.md

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

Update repo after prototype presentation

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