温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/globals/Uint8ArrayConstructor
点击访问原文链接

interface Uint8ArrayConstructor | globals module | Bun

interface Uint8ArrayConstructor | globals module | BunBuildDocsReferenceGuidesBlogDiscord/Globals/Uint8ArrayConstructorPBYTES_PER_ELEMENTCoconstructorMfromMfromBase64MfromHexMofPprototype

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Globals/Uint8ArrayConstructorPBYTES_PER_ELEMENTCoconstructorMfromMfromBase64MfromHexMofPprototype

interface

Uint8ArrayConstructorinterface Uint8ArrayConstructorconstructor Uint8ArrayConstructor(length: number): Uint8ArrayArrayBuffer>;constructor Uint8ArrayConstructor(array: ArrayLikenumber>): Uint8ArrayArrayBuffer>;constructor Uint8ArrayConstructorTArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer,byteOffset?: number,length?: number): Uint8ArrayTArrayBuffer>;constructor Uint8ArrayConstructor(buffer: ArrayBuffer,byteOffset?: number,length?: number): Uint8ArrayArrayBuffer>;constructor Uint8ArrayConstructor(array: ArrayBuffer | ArrayLikenumber>): Uint8ArrayArrayBuffer>;constructor Uint8ArrayConstructor(elements: Iterablenumber>): Uint8ArrayArrayBuffer>;constructor (): Uint8ArrayArrayBuffer>;readonly BYTES_PER_ELEMENT: number

The size in bytes of each element in the array.

readonly prototype: Uint8ArrayArrayBufferLike>from(arrayLike: ArrayLikenumber>): Uint8ArrayArrayBuffer>;

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

@param arrayLike

An array-like object to convert to an array.

fromT>(arrayLike: ArrayLikeT>,mapfn: (v: T, k: number) => number,thisArg?: any): Uint8ArrayArrayBuffer>;

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

@param arrayLike

An array-like object to convert to an array.

@param mapfn

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

@param thisArg

Value of 'this' used to invoke the mapfn.

from(elements: Iterablenumber>): Uint8ArrayArrayBuffer>;

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

@param elements

An iterable object to convert to an array.

fromT>(elements: IterableT>,mapfn?: (v: T, k: number) => number,thisArg?: any): Uint8ArrayArrayBuffer>;

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

@param elements

An iterable object to convert to an array.

@param mapfn

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

@param thisArg

Value of 'this' used to invoke the mapfn.

fromBase64(base64: string,options?: { alphabet: 'base64' | 'base64url'; lastChunkHandling: 'strict' | 'loose' | 'stop-before-partial' }): Uint8ArrayArrayBuffer>;

Create a new Uint8Array from a base64 encoded string

@param base64

The base64 encoded string to convert to a Uint8Array

@param options

Optional options for decoding the base64 string

@returns

A new Uint8Array containing the decoded data

fromHex(hex: string): Uint8ArrayArrayBuffer>;

Create a new Uint8Array from a hex encoded string

@param hex

The hex encoded string to convert to a Uint8Array

@returns

A new Uint8Array containing the decoded data

of(...items: number[]): Uint8ArrayArrayBuffer>;

Returns a new array from a set of elements.

@param items

A set of elements to include in the new array object.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

interface Uint8ArrayConstructor | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for interface globals.Uint8ArrayConstructor | Bun