UNPKG

@i-xi-dev/base64

Version:

A JavaScript Base64 encoder and decoder, implements Forgiving base64 defined in WHATWG Infra Standard.

31 lines (30 loc) 959 B
import { inRange } from "./bigint.js"; export var BigUint64; (function (BigUint64) { /** * The number of bytes used to represent a 64-bit unsigned integer. */ BigUint64.BYTES = 8; /** * The number of bits used to represent a 64-bit unsigned integer. */ BigUint64.SIZE = 64; /** * The minimum value of 64-bit unsigned integer. */ BigUint64.MIN_VALUE = 0x0n; /** * The maximum value of 64-bit unsigned integer. */ BigUint64.MAX_VALUE = 0xffffffffffffffffn; /** * Determines whether the passed `test` is a 64-bit unsigned integer. * * @param test - The value to be tested * @returns Whether the passed `test` is a 64-bit unsigned integer. */ function isBigUint64(test) { return (typeof test === "bigint") && inRange(test, [BigUint64.MIN_VALUE, BigUint64.MAX_VALUE]); } BigUint64.isBigUint64 = isBigUint64; })(BigUint64 || (BigUint64 = {}));