source: imaps-frontend/node_modules/is-boolean-object/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-boolean-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 Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
13
14## Example
15
16```js
17var isBoolean = require('is-boolean-object');
18var assert = require('assert');
19
20assert.notOk(isBoolean(undefined));
21assert.notOk(isBoolean(null));
22assert.notOk(isBoolean('foo'));
23assert.notOk(isBoolean(function () {}));
24assert.notOk(isBoolean([]));
25assert.notOk(isBoolean({}));
26assert.notOk(isBoolean(/a/g));
27assert.notOk(isBoolean(new RegExp('a', 'g')));
28assert.notOk(isBoolean(new Date()));
29assert.notOk(isBoolean(42));
30assert.notOk(isBoolean(NaN));
31assert.notOk(isBoolean(Infinity));
32
33assert.ok(isBoolean(new Boolean(42)));
34assert.ok(isBoolean(false));
35assert.ok(isBoolean(Object(false)));
36assert.ok(isBoolean(true));
37assert.ok(isBoolean(Object(true)));
38```
39
40## Tests
41Simply clone the repo, `npm install`, and run `npm test`
42
43[1]: https://npmjs.org/package/is-boolean-object
44[2]: https://versionbadg.es/inspect-js/is-boolean-object.svg
45[5]: https://david-dm.org/inspect-js/is-boolean-object.svg
46[6]: https://david-dm.org/inspect-js/is-boolean-object
47[7]: https://david-dm.org/inspect-js/is-boolean-object/dev-status.svg
48[8]: https://david-dm.org/inspect-js/is-boolean-object#info=devDependencies
49[11]: https://nodei.co/npm/is-boolean-object.png?downloads=true&stars=true
50[license-image]: https://img.shields.io/npm/l/is-boolean-object.svg
51[license-url]: LICENSE
52[downloads-image]: https://img.shields.io/npm/dm/is-boolean-object.svg
53[downloads-url]: https://npm-stat.com/charts.html?package=is-boolean-object
54[codecov-image]: https://codecov.io/gh/inspect-js/is-boolean-object/branch/main/graphs/badge.svg
55[codecov-url]: https://app.codecov.io/gh/inspect-js/is-boolean-object/
56[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-boolean-object
57[actions-url]: https://github.com/inspect-js/is-boolean-object/actions
Note: See TracBrowser for help on using the repository browser.