This library provides a JavaScript implementation of arbitrary-precision arithmetic, specifically designed to be compatible with Node.js's `node-bignum` API while being usable in browser environments via Browserify. It is based on `bignumber.js` by MikeMcl. The current stable version is 1.3.0-2, released approximately nine years ago. It differs from the original `node-bignum` by explicitly *omitting* several key methods, including `prime`, `toNumber`, bitwise operations (`and`, `or`, `xor`), modular inverse, random number generation, primality testing, root, shift operations, GCD, and Jacobi symbol. This makes it suitable only for specific use cases that do not require these advanced features, such as its original purpose for `node-srp`. Given its age and the explicit statement about unimplemented features, active development is not ongoing, and it targets older browserify workflows rather than modern ESM or bundler setups.
npm install browserify-bignumVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import the BigNumber constructor, create instances from strings, and perform basic arithmetic and comparison operations.
Review the list of unsupported methods in the README. If these methods are critical, consider using `bignumber.js` directly or a different modern arbitrary-precision library that supports them.
For new projects, consider modern, actively maintained alternatives like `bignumber.js`, `decimal.js`, or native `BigInt` (if integer-only operations are sufficient).
Ensure your build setup correctly handles CommonJS modules if integrating into a modern frontend or backend project. For browsers, it's intended to be bundled via Browserify.
Audit the source code and its (potentially transitive) dependencies for known vulnerabilities. Consider sandboxing or migrating to a more secure, maintained library.
Consult the `browserify-bignum` README for the list of unimplemented methods. If the functionality is required, migrate to `bignumber.js` or another library.
Ensure your browser-side code is bundled using Browserify. If using modern bundlers (Webpack/Rollup/Vite), confirm they are configured to correctly handle CommonJS modules.
Install the package via npm: `npm install browserify-bignum`. Verify your module resolution settings if using a custom environment.
No dependency data recorded yet.