---
title: "@std/bytes"
description: "Utilities to manipulate Uint8Arrays that are not built-in to JavaScript"
jsr: jsr:@std/bytes
pkg: bytes
version: 1.0.6
generated: true
stability: stable
---
## Overview
Helper functions for working with
Uint8Array
byte slices.
```js
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);
```
### Add to your project
```sh
deno add jsr:@std/bytes
```
See all symbols in @std/bytes on