Skip to main content

Built and signed on GitHub Actions

A Hyper-Performant GC-Minimizing UInt32Array-Backed Boolean Array in Typescript

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 months ago (0.6.0)
method BooleanArray.validateValue
BooleanArray.validateValue(
value: number,
maxSize?: number,
): number

Validate a value

Parameters

value: number

the value to validate

optional
maxSize: number

Return Type

the validated value

Throws

TypeError

if value is not a safe integer

RangeError

if value is less than 1, or is greater than BooleanArray.MAX_SAFE_SIZE

Add Package

deno add jsr:@phughesmcr/booleanarray

Import symbol

import { BooleanArray } from "@phughesmcr/booleanarray";

---- OR ----

Import directly with a jsr specifier

import { BooleanArray } from "jsr:@phughesmcr/booleanarray";

Add Package

npx jsr add @phughesmcr/booleanarray

Import symbol

import { BooleanArray } from "@phughesmcr/booleanarray";

Add Package

yarn dlx jsr add @phughesmcr/booleanarray

Import symbol

import { BooleanArray } from "@phughesmcr/booleanarray";

Add Package

pnpm dlx jsr add @phughesmcr/booleanarray

Import symbol

import { BooleanArray } from "@phughesmcr/booleanarray";

Add Package

bunx jsr add @phughesmcr/booleanarray

Import symbol

import { BooleanArray } from "@phughesmcr/booleanarray";