method Uint8ArrayConstructor.from
Private
Uint8ArrayConstructor.from(arrayLike: ArrayLike<number>): Uint8Array

Creates an array from an array-like or iterable object.

Parameters

arrayLike: ArrayLike<number>

An array-like or iterable object to convert to an array.

Return Type

Uint8ArrayConstructor.from<T>(
arrayLike: ArrayLike<T>,
mapfn: (
v: T,
k: number,
) => number
,
thisArg?: any,
): Uint8Array

Creates an array from an array-like or iterable object.

Type Parameters

Parameters

arrayLike: ArrayLike<T>

An array-like or iterable object to convert to an array.

mapfn: (
v: T,
k: number,
) => number

A mapping function to call on every element of the array.

optional
thisArg: any

Value of 'this' used to invoke the mapfn.

Return Type