close
Skip to main content
This release is versions behind 1.0.6 — the latest version of @std/bytes.
Works with
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 Score100%
Downloads63,239/wk
Published2 years ago (0.215.0)

Utilities to manipulate Uint8Arrays that are not built-in to JavaScript

Functions

f
indexOfNeedle(
source: Uint8Array,
needle: Uint8Array,
start?
): number

Returns the index of the first occurrence of the needle array in the source array, or -1 if it is not present.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/bytes

Import symbol

import * as mod from "@std/bytes/index_of_needle";
or

Import directly with a jsr specifier

import * as mod from "jsr:@std/bytes/index_of_needle";