MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / equalUint8Arrays

Function equalUint8Arrays

packages/@stdlib/misc/src/bytes.ts:1–13  ·  view source on GitHub ↗
(a: Uint8Array, b: Uint8Array)

Source from the content-addressed store, hash-verified

1export function equalUint8Arrays(a: Uint8Array, b: Uint8Array): boolean {
2 if (a.length !== b.length) {
3 return false;
4 }
5
6 for (let i = 0; i < a.length; i++) {
7 if (a[i] !== b[i]) {
8 return false;
9 }
10 }
11
12 return true;
13}
14
15export function concatUint8Arrays(...arrays: Uint8Array[]) {
16 let totalLength = 0;

Callers 2

constructorMethod · 0.90
rooms.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected