Skip to main content
Home

@std/bytes@1.0.6
Built and signed on GitHub Actions

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

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
8 months ago (1.0.6)

default

Helper functions for working with Uint8Array byte slices.

f
concat

Concatenate an array of byte slices into a single slice.

f
copy

Copy bytes from the source array to the destination array and returns the number of bytes copied.

f
endsWith

Returns true if the suffix array appears at the end of the source array, false otherwise.

f
equals

Check whether byte slices are equal to each other.

f
includesNeedle

Determines whether the source array contains the needle array.

f
indexOfNeedle

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

f
lastIndexOfNeedle

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

f
repeat

Returns a new byte slice composed of count repetitions of the source array.

f
startsWith

Returns true if the prefix array appears at the start of the source array, false otherwise.

f
concat

Concatenate an array of byte slices into a single slice.

f
copy

Copy bytes from the source array to the destination array and returns the number of bytes copied.

f
endsWith

Returns true if the suffix array appears at the end of the source array, false otherwise.

f
equals

Check whether byte slices are equal to each other.

f
includesNeedle

Determines whether the source array contains the needle array.

f
indexOfNeedle

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

f
lastIndexOfNeedle

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

f
repeat

Returns a new byte slice composed of count repetitions of the source array.

f
startsWith

Returns true if the prefix array appears at the start of the source array, false otherwise.

New Ticket: 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.