Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 15, 2024 via pnpm

big-integer 1.6.52

An arbitrary length integer library for Javascript
Package summary
Share
0
issues
1
license
1
Unlicense
Package created
10 Jan 2013
Version published
21 Nov 2023
Maintainers
1
Total deps
1
Direct deps
0
License
Unlicense

Issues

0
This package has no issues

Licenses

The Unlicense

Public Domain
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
private-use
modify
Cannot
include-copyright
hold-liable
Must
1 Packages, Including:
big-integer@1.6.52
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of big-integer 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does big-integer do?

BigInteger.js is a powerful library in JavaScript that essentially allows users to conduct arithmetic operations on integers with no limitations on their size. It fulfills that purpose by bypassing the size limit inherent in JavaScript's number data type, therefore eliminating any size-associated errors that may occur during the computation process. As of December 2, 2018, the library also functions as a polyfill, working as a wrapper over JavaScript's native BigInt if it is supported by the environment.

How do you use big-integer?

BigInteger.js can be utilized in various ways depending on whether the code is executed in a browser or through Node.js. If utilizing a browser, developers can either download BigInteger.js or hotlink directly to it. In a Node.js environment, BigInteger.js can be installed using npm and then simply requiring it in the code.

For instance, to use BigInteger.js in Node.js, the steps are as follows:

  1. Install BigInteger.js using npm:
npm install big-integer
  1. Import it into your code:
var bigInt = require("big-integer");
  1. Then you can start doing operations on BigInts like so:
var bigNumber = bigInt("123456789012345678901234567890");

BigIntegers can be created by passing in a number, a string representing the number or another BigInteger to the bigInt function. If you provide a second parameter, it will parse the passed number as a base base number.

BigInteger.js also provides several methods for doing operations on BigInts such as addition (add), subtraction (subtract), multiplication (multiply) and more.

Examples:

var sum = bigInt(5).add(7);  // Returns a BigInteger representing "12"
var difference = bigInt(3).subtract(5);  // Returns a BigInteger representing "-2"
var product = bigInt(111).multiply(111);  // Returns a BigInteger representing "12321"

Note that operations performed using BigInteger.js return BigIntegers that allows for method chaining. A wide range of methods are available, from basic arithmetic to bitwise operations.

Where are the big-integer docs?

Documents related to BigInteger.js can be found in the README content of the library's GitHub repository. These documents provide comprehensive details about the library's installation, usage, its methods, and how to contribute to the project. If you are interested in running the test suite or the benchmarks, they are available in the repository as well. Other relevant information such as licensing information is also available in the repository.