The size in bytes of each element in the array.
Symbol
Uint8ArrayConstructor
interface Uint8ArrayConstructor
- constructor <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array<TArrayBuffer>
Creates an array from an array-like or iterable object.
@param arrayLikeAn array-like object to convert to an array.
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>Creates an array from an array-like or iterable object.
@param arrayLikeAn array-like object to convert to an array.
@param mapfnA mapping function to call on every element of the array.
@param thisArgValue of 'this' used to invoke the mapfn.
Creates an array from an array-like or iterable object.
@param elementsAn iterable object to convert to an array.
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>Creates an array from an array-like or iterable object.
@param elementsAn iterable object to convert to an array.
@param mapfnA mapping function to call on every element of the array.
@param thisArgValue of 'this' used to invoke the mapfn.
- fromBase64(base64: string, options?: { alphabet: 'base64' | 'base64url'; lastChunkHandling: 'loose' | 'strict' | 'stop-before-partial' }): Uint8Array
Create a new Uint8Array from a base64 encoded string
@param base64The base64 encoded string to convert to a Uint8Array
@param optionsOptional options for decoding the base64 string
@returnsA new Uint8Array containing the decoded data
Create a new Uint8Array from a hex encoded string
@param hexThe hex encoded string to convert to a Uint8Array
@returnsA new Uint8Array containing the decoded data
Returns a new array from a set of elements.
@param itemsA set of elements to include in the new array object.