API reference › @evolu/common › BigInt › isBetweenBigInt
function isBetweenBigInt(min: bigint, max: bigint): Predicate<bigint>;
Defined in: packages/common/src/BigInt.ts:36
Creates a predicate that checks if a BigInt is within a range, inclusive.
Example
import { assertFalse, assertTrue, isBetweenBigInt } from "@evolu/common";
const isBetween10And20 = isBetweenBigInt(10n, 20n);
assertTrue(isBetween10And20(20n));
assertFalse(isBetween10And20(25n));