Skip to content

Node.JS bigint swissknife repository. Math utils, buffer conversion, checked byte sized and more

License

Notifications You must be signed in to change notification settings

vekexasia/bigint-swissknife

Repository files navigation

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.

About

Node.JS bigint swissknife repository. Math utils, buffer conversion, checked byte sized and more

Resources

License

Stars

Watchers

Forks

Packages

No packages published