Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/stdUtilities to manipulate Uint8Arrays that are not built-in to JavaScript
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
100%
Published
a week ago (1.0.4)
Helper functions for working with
Uint8Array
byte slices.
import { concat, indexOfNeedle, endsWith } from "@std/bytes"; import { assertEquals } from "@std/assert"; const a = new Uint8Array([0, 1, 2]); const b = new Uint8Array([3, 4, 5]); const c = concat([a, b]); assertEquals(c, new Uint8Array([0, 1, 2, 3, 4, 5])); assertEquals(indexOfNeedle(c, new Uint8Array([2, 3])), 2); assertEquals(endsWith(c, b), true);
Built and signed on
View transparency logGitHub Actions
Add Package
deno add jsr:@std/bytes
Import symbol
import * as bytes from "@std/bytes";
---- OR ----
Import directly with a jsr specifier
import * as bytes from "jsr:@std/bytes";
Add Package
npx jsr add @std/bytes
Import symbol
import * as bytes from "@std/bytes";
Add Package
yarn dlx jsr add @std/bytes
Import symbol
import * as bytes from "@std/bytes";
Add Package
pnpm dlx jsr add @std/bytes
Import symbol
import * as bytes from "@std/bytes";
Add Package
bunx jsr add @std/bytes
Import symbol
import * as bytes from "@std/bytes";