UNPKG

766 BTypeScriptView Raw
1/// <reference types="node" />
2declare type Sequence = number[] | Buffer | Uint8Array;
3/**
4 * Check whether two sequences (e.g. arrays of numbers) are equal.
5 *
6 * @param arr1 One of the arrays to compare.
7 * @param arr2 The other array to compare.
8 */
9export declare function seqEqual(arr1: Sequence, arr2: Sequence): boolean;
10/**
11* Concatenate all `arguments` into a single array. Each argument can be either
12* a single element or a sequence, which has a `length` property and supports
13* element retrieval via sequence[ix].
14*
15* > concatArgs(1, [2, 3], Buffer.from([4,5]), new Uint8Array([6, 7]));
16* [1,2,3,4,5,6,7]
17*
18* @returns {number[]} Array of concatenated arguments
19*/
20export declare function concatArgs(...args: (number | Sequence)[]): number[];
21export {};