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
29M
decreased by-0.81%
Maintainers
1
Install size
14.5 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.0 - 2018-09-20

Commits

  • [Tests] add tests 847f12a
  • Initial commit b53f3c6
  • readme 66c15fe
  • Implementation c2c0974
  • package.json 98b174c
  • Only apps should have lockfiles a77c74b

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 21 Sep 2018

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