long.js
long.js copied to clipboard
A Long class for representing a 64-bit two's-complement integer value.
The builtin [BigInt type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is supported in many browsers and in NodeJS (such as the fs.stat API). Current behavior is particularly spurious and can cause bugs: `Long.fromValue(55n)` results in 0...
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...
Using the latest v5.2.0 package (containing JS and TypeScript index.d.ts), I've tried the following: Importing with ESM default: ``` import Long from "long"; import Long from "long/umd"; // these statements...
There isn't much logic here as BigInt's conversions are being done using its string representations, but I've got tests anyways. On environments that don't support BigInt, everything else works fine...
Node 16.1+ does not support WASM on ARMv6. Unfortunately rather than failing nice, this code causes node to exit with an error, which unnecessarily prevents any packages that depend on...
Is it possible to use long.js library to retrieve the square root of a number?
It might be better to use javascript's symbols to validate if an object is long. By using a symbol, we can guarantee that the property indicating if an object is...
Add multiply-add / multiply-sub (MADD / MSUB) operations. Also implemented sub / add wasm versions
This is basically a clean up of the previous PR: https://github.com/dcodeIO/long.js/pull/62. Adds power function. See original PR for previous details and discussion. This also fixes a couple places where multiply...