Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 1.83 KB

README.md

File metadata and controls

38 lines (22 loc) · 1.83 KB

bigint-swissknife

BigInt is a great addition to the JavaScript language, but it's still missing some utilities and features. This project aims to provide some missing utilities and features for BigInt.

This is a mono-repository containing several packages that provide utilities for working with BigInts.

A couple of examples:

  • bigint lacks support in Math.max and Math.min functions.
  • The Buffer class does not support bigint natively.
  • There is no way to work with bounded BigInts (e.g., uint8, int8, uint16, int16, etc.).
  • There is no way to work with bigint and Uint8Array natively converting between the two.
  • Generating a random bigint is not possible natively.

Packages

Currently, this repo is composed by the following packages:

All the packages are written in TypeScript and come with their own type definitions.

All the packages1 also provide a browser compatible build. Check out the README of each package for more information.

1 exception made for bigint-buffer-polyfill which does not make sense in a browser environment.

Documentation

You can find the main typedoc documentation here.

License

This project is licensed under the MIT License - see the LICENSE file for details.