Skip to main content

Built and signed on GitHub Actions

A high-performance PartitionedBuffer implementation backed by Uint32Array for efficient memory usage and fast bitwise operations.

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.2.8)
method PartitionedBuffer.prototype.addPartition
PartitionedBuffer.prototype.addPartition<T extends SchemaSpec<T> | null = null>(partition: Partition<T>): PartitionStorage<T>

Add a partition to the buffer

Type Parameters

T extends SchemaSpec<T> | null = null

Parameters

partition: Partition<T>
  • The partition specification to add

Return Type

PartitionStorage<T>

The partition storage, or null if no schema was provided

Throws

Error

If the partition name exists or there isn't enough space

TypeError

If the schema contains invalid properties

Add Package

deno add jsr:@phughesmcr/partitionedbuffer

Import symbol

import { PartitionedBuffer } from "@phughesmcr/partitionedbuffer";

---- OR ----

Import directly with a jsr specifier

import { PartitionedBuffer } from "jsr:@phughesmcr/partitionedbuffer";

Add Package

npx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { PartitionedBuffer } from "@phughesmcr/partitionedbuffer";

Add Package

yarn dlx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { PartitionedBuffer } from "@phughesmcr/partitionedbuffer";

Add Package

pnpm dlx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { PartitionedBuffer } from "@phughesmcr/partitionedbuffer";

Add Package

bunx jsr add @phughesmcr/partitionedbuffer

Import symbol

import { PartitionedBuffer } from "@phughesmcr/partitionedbuffer";