Skip to main content

uint8array utilities

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
94%
Published
3 days ago (1.0.1)
f
alloc

creates an Uint8Array of the requested size, with the contents zeroed

v
allocUnsafe

creates an Uint8Array of the requested size, where the contents may not be zeroed out. only use if you're certain that the contents will be overwritten

f
compare

compares two Uint8Array buffers

f
concat

concatenates multiple Uint8Array buffers into one

f
decodeUtf8From

decodes a UTF-8 string from a buffer

f
encodeUtf8Into

encodes a UTF-8 string into the buffer

f
equals

checks if the two Uint8Array buffers are equal

f
timingSafeEquals

checks if the two Uint8Array buffers are equal, timing-safe version

f
toSha256

get a SHA-256 digest of this buffer