Socket
Socket
Sign inDemoInstall

is-bigint

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-bigint

Is this value an ES BigInt?


Version published
Weekly downloads
27M
decreased by-5.18%
Maintainers
1
Install size
17.8 kB
Created
Weekly downloads
 

Package description

What is is-bigint?

The is-bigint npm package provides a simple and straightforward way to check if a given value is a BigInt. It is particularly useful in applications where distinguishing between BigInt and other numeric types is necessary for correct operation or data handling.

What are is-bigint's main functionalities?

Check if a value is a BigInt

This feature allows you to verify whether a given value is of the BigInt type. It's useful for type checking in applications that need to handle large integers safely.

const isBigInt = require('is-bigint');

console.log(isBigInt(10n)); // true
console.log(isBigInt(10)); // false

Other packages similar to is-bigint

Changelog

Source

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

Readme

Source

is-bigint Version Badge

Build Status 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

Keywords

FAQs

Last updated on 30 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc