Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
has-bigints
Advanced tools
Package description
The has-bigints npm package is a simple utility that allows developers to check if the JavaScript environment they are working in supports BigInts. BigInts are a type of data in JavaScript that can represent whole numbers larger than 2^53 - 1, which is the largest number JavaScript can reliably represent with the Number primitive. This package is particularly useful for writing code that needs to be compatible with various JavaScript environments, including older browsers or JavaScript engines that do not support BigInts.
Checking for BigInt support
This feature allows developers to programmatically check if the current JavaScript environment supports BigInts. The function returns a boolean value, true if BigInts are supported and false otherwise. This is useful for conditional code execution based on BigInt support.
const hasBigInts = require('has-bigints');
if (hasBigInts()) {
console.log('This environment supports BigInts.');
} else {
console.log('BigInts are not supported in this environment.');
}
The big-integer package is a JavaScript library for arbitrary-precision integer arithmetic. Unlike has-bigints, which is a utility for checking BigInt support, big-integer provides its own implementation for handling large integers, making it useful in environments that do not support BigInt natively.
bignumber.js is another library for arbitrary-precision arithmetic in JavaScript. Similar to big-integer, it does not rely on native BigInt support and can perform mathematical operations on large numbers. It offers more comprehensive features for arithmetic operations compared to has-bigints, which is solely focused on checking for BigInt support.
Changelog
v1.0.1 - 2020-12-13
46a0d6b
91a38fa
69aacba
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, tape
64e2c08
nyc
on all tests; use tape
runner 8009375
e599917
bd0126e
8e02a73
eslint
, @ljharb/eslint-config
, auto-changelog
, safe-publish-latest
95859f2
auto-changelog
, in-publish
, tape
0588f41
eslint
, @ljharb/eslint-config
, tape
5b024a6
version
scripts 4788d61
pull_request_target
event be0e0de
auto-changelog
; add aud
13a8d1b
f873d9a
funding
field 1b51f49
auto-changelog
2322461
aabdade
Readme
FAQs
Determine if the JS environment has BigInt support.
The npm package has-bigints receives a total of 28,361,460 weekly downloads. As such, has-bigints popularity was classified as popular.
We found that has-bigints demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.