Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-bigint

inspect-js101.5mMIT1.1.0TypeScript support: included

Is this value an ES BigInt?

bigint, es, integer, is

readme

is-bigint Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this an ES BigInt value?

Example

var isBigInt = require('is-bigint');
assert(!isBigInt(function () {}));
assert(!isBigInt(null));
assert(!isBigInt(function* () { yield 42; return Infinity; });
assert(!isBigInt(Symbol('foo')));

assert(isBigInt(1n));
assert(isBigInt(Object(1n)));

Tests

Simply clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.1.0 - 2024-12-02

Commits

  • [actions] reuse common workflows 0e63a44
  • [meta] use npmignore to autogenerate an npmignore file 47584ee
  • [Tests] use for-each and es-value-fixtures f226864
  • [New] add types 78e2c47
  • [actions] split out node 10-20, and 20+ 4395a8d
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, has-symbols, object-inspect, tape c188501
  • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, safe-publish-latest, tape 5360d32
  • [actions] update rebase action to use reusable workflow d5c1775
  • [actions] update codecov uploader c7478c7
  • [Dev Deps] update @ljharb/eslint-config, auto-changelog, npmignore, object-inspect, tape 6fbce66
  • [meta] add missing engines.node 6f9ed42
  • [Tests] replace aud with npm audit 21846c3
  • [Dev Deps] remove unused has-symbols, add missing has-tostringtag b378d94
  • [Deps] update has-bigints f46c35b
  • [Dev Deps] add missing peer dep 2b9be16

v1.0.4 - 2021-08-11

Commits

  • [eslint] remove unnecessary eslintrc file 7220aa5
  • [readme] add github actions/codecov badges 053a071
  • [Deps] add has-bigints as a runtime dependency 0fc3c9d
  • [Dev Deps] update tape 145f11d

v1.0.3 - 2021-08-06

Commits

  • [Tests] use has-tostringtag for easier checking of Symbol.toStringTag 3b44080
  • [Dev Deps] update auto-changelog, eslint, object-inspect, tape e4d4a6c
  • [Fix] use has-bigints for more robust BigInt detection 7bb9d7a

v1.0.2 - 2021-05-04

Commits

  • [meta] do not publish github action workflow files 276d677
  • [actions] use node/install instead of node/run; use codecov action cea7fb6
  • [readme] fix repo URLs; remove travis badge c8e7c36
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbols, object-inspect, tape 32f3d90
  • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape c2f20f5
  • [meta] remove unneeded token; update checkout action 94e46e9
  • [meta] use prepublishOnly script for npm 7+ 3e663ec

v1.0.1 - 2020-11-30

Commits

  • [Tests] use shared travis-ci configs 28f1211
  • [Tests] migrate tests to Github Actions 0998c64
  • [meta] add auto-changelog 2352de6
  • [Tests] run nyc on all tests 9c16a9a
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, object-inspect, tape 4cd0edd
  • [actions] add automatic rebasing / merge commit blocking f0f4b91
  • [actions] add "Allow Edits" workflow 7f4f46e
  • [meta] create FUNDING.yml 2d0cb9a
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud 0ee110e
  • [Dev Deps] update eslint, @ljharb/eslint-config, has-symbols, object-inspect, tape 5bb7f3a
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, tape d3d67d0
  • [Dev Deps] update auto-changelog, tape 54e270f
  • [Dev Deps] update @ljharb/eslint-config, tape d82bfe7
  • [Dev Deps] update auto-changelog; add aud 9c34bd1
  • [Tests] add missing posttest script 0690bd9
  • [meta] add funding field 7ca36d0
  • [actions] switch Automatic Rebase workflow to pull_request_target event 5ffa8da
  • [Dev Deps] update eslint 8512c2f
  • [Tests] only audit prod deps f2147dc
  • [readme] fix header d6eff75

v1.0.0 - 2018-09-20

Commits