UNPKG

@isdk/bigint

Version:

The BigInteger class wrapped bn.js and native BitInt

25 lines (23 loc) 365 B
import { BN } from "./chunk-NHBNFARZ.mjs"; import { BigIntNative } from "./chunk-BDKWX5JO.mjs"; // src/index.ts function detectBigInt() { return typeof BigInt !== "undefined"; } async function getBigInteger() { if (detectBigInt()) { return BigIntNative; } else { return BN; } } export { BN, BigIntNative, detectBigInt, getBigInteger };