Skip to main content

BigInteger for Deno

JavaScript now has native support for BigInt, but its API is severely lacking. This library aims to remedy that.

Usage

import { bigInt } from "https://deno.land/x/biginteger/mod.ts";

const a = bigInt(
  "93326215443944152681699238856266700490715968264381621468592963895217599993229915",
);
const b = bigInt(
  "21468592963895217599993229915608941463976156518286253697920827214685929638952175",
);

a.multiply(b).toString();
// "2003582532226828627833504650735394198747828762251042575640623033662674699410937703900077350590593427232847990042248639450943589181129260182420626320274464315125n"