[d565449] | 1 | # is-bigint <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 |
|
---|
| 12 | Is this an ES BigInt value?
|
---|
| 13 |
|
---|
| 14 | ## Example
|
---|
| 15 |
|
---|
| 16 | ```js
|
---|
| 17 | var isBigInt = require('is-bigint');
|
---|
| 18 | assert(!isBigInt(function () {}));
|
---|
| 19 | assert(!isBigInt(null));
|
---|
| 20 | assert(!isBigInt(function* () { yield 42; return Infinity; });
|
---|
| 21 | assert(!isBigInt(Symbol('foo')));
|
---|
| 22 |
|
---|
| 23 | assert(isBigInt(1n));
|
---|
| 24 | assert(isBigInt(Object(1n)));
|
---|
| 25 | ```
|
---|
| 26 |
|
---|
| 27 | ## Tests
|
---|
| 28 | Simply clone the repo, `npm install`, and run `npm test`
|
---|
| 29 |
|
---|
| 30 | [1]: https://npmjs.org/package/is-bigint
|
---|
| 31 | [2]: https://versionbadg.es/inspect-js/is-bigint.svg
|
---|
| 32 | [5]: https://david-dm.org/inspect-js/is-bigint.svg
|
---|
| 33 | [6]: https://david-dm.org/inspect-js/is-bigint
|
---|
| 34 | [7]: https://david-dm.org/inspect-js/is-bigint/dev-status.svg
|
---|
| 35 | [8]: https://david-dm.org/inspect-js/is-bigint#info=devDependencies
|
---|
| 36 | [11]: https://nodei.co/npm/is-bigint.png?downloads=true&stars=true
|
---|
| 37 | [license-image]: https://img.shields.io/npm/l/is-bigint.svg
|
---|
| 38 | [license-url]: LICENSE
|
---|
| 39 | [downloads-image]: https://img.shields.io/npm/dm/is-bigint.svg
|
---|
| 40 | [downloads-url]: https://npm-stat.com/charts.html?package=is-bigint
|
---|
| 41 | [codecov-image]: https://codecov.io/gh/inspect-js/is-bigint/branch/main/graphs/badge.svg
|
---|
| 42 | [codecov-url]: https://app.codecov.io/gh/inspect-js/is-bigint/
|
---|
| 43 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-bigint
|
---|
| 44 | [actions-url]: https://github.com/inspect-js/is-bigint/actions
|
---|