Skip to content

ByteView

Defined in: node_modules/.pnpm/multiformats@13.4.1/node_modules/multiformats/dist/src/block/interface.d.ts:12

A byte-encoded representation of some type of Data.

A ByteView is essentially a Uint8Array that’s been “tagged” with a Data type parameter indicating the type of encoded data.

For example, a ByteView<{ hello: "world" }> is a Uint8Array containing a binary representation of a {hello: "world"}.

Type Parameter
Data
[index: number]: number
optional [Marker]: Data;

Defined in: node_modules/.pnpm/multiformats@13.4.1/node_modules/multiformats/dist/src/block/interface.d.ts:33

Phantom.[Marker]


readonly [toStringTag]: "Uint8Array";

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:284

ByteView.[toStringTag]


readonly buffer: ArrayBufferLike;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2174

The ArrayBuffer instance referenced by the array.

Uint8Array.buffer

readonly byteLength: number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2179

The length in bytes of the array.

ByteView.byteLength


readonly byteOffset: number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2184

The offset in bytes of the array.

ByteView.byteOffset


readonly BYTES_PER_ELEMENT: number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2169

The size in bytes of each element in the array.

ByteView.BYTES_PER_ELEMENT


readonly length: number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2283

The length of the array.

ByteView.length

iterator: ArrayIterator<number>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:313

ArrayIterator<number>

Uint8Array.[iterator]

at(index): undefined | number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts:48

Returns the item located at the specified index.

ParameterTypeDescription
indexnumberThe zero-based index of the desired code unit. A negative index will count back from the last item.

undefined | number

Uint8Array.at

copyWithin(
target,
start,
end?): this;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2195

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

ParameterTypeDescription
targetnumberIf target is negative, it is treated as length+target where length is the length of the array.
startnumberIf start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
end?numberIf not specified, length of the this object is used as its default value.

this

Uint8Array.copyWithin

entries(): ArrayIterator<[number, number]>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:318

Returns an array of key, value pairs for every entry in the array

ArrayIterator<[number, number]>

Uint8Array.entries

every(predicate, thisArg?): boolean;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2205

Determines whether all the members of an array satisfy the specified test.

ParameterTypeDescription
predicate(value, index, array) => unknownA function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
thisArg?anyAn object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

Uint8Array.every

fill(
value,
start?,
end?): this;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2215

Changes all array elements from start to end index to a static value and returns the modified array

ParameterTypeDescription
valuenumbervalue to fill array section with
start?numberindex to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.
end?numberindex to stop filling the array at. If end is negative, it is treated as length+end.

this

Uint8Array.fill

filter(predicate, thisArg?): Uint8Array<ArrayBuffer>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2224

Returns the elements of an array that meet the condition specified in a callback function.

ParameterTypeDescription
predicate(value, index, array) => anyA function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
thisArg?anyAn object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Uint8Array<ArrayBuffer>

Uint8Array.filter

find(predicate, thisArg?): undefined | number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2235

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

ParameterTypeDescription
predicate(value, index, obj) => booleanfind calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
thisArg?anyIf provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

undefined | number

Uint8Array.find

findIndex(predicate, thisArg?): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2246

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

ParameterTypeDescription
predicate(value, index, obj) => booleanfind calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.
thisArg?anyIf provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number

Uint8Array.findIndex

forEach(callbackfn, thisArg?): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2255

Performs the specified action for each element in an array.

ParameterTypeDescription
callbackfn(value, index, array) => voidA function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
thisArg?anyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

void

Uint8Array.forEach

includes(searchElement, fromIndex?): boolean;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts:52

Determines whether an array includes a certain element, returning true or false as appropriate.

ParameterTypeDescription
searchElementnumberThe element to search for.
fromIndex?numberThe position in this array at which to begin searching for searchElement.

boolean

Uint8Array.includes

indexOf(searchElement, fromIndex?): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2263

Returns the index of the first occurrence of a value in an array.

ParameterTypeDescription
searchElementnumberThe value to locate in the array.
fromIndex?numberThe array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

Uint8Array.indexOf

join(separator?): string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2270

Adds all the elements of an array separated by the specified separator string.

ParameterTypeDescription
separator?stringA string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

string

Uint8Array.join

keys(): ArrayIterator<number>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:323

Returns an list of keys in the array

ArrayIterator<number>

Uint8Array.keys

lastIndexOf(searchElement, fromIndex?): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2278

Returns the index of the last occurrence of a value in an array.

ParameterTypeDescription
searchElementnumberThe value to locate in the array.
fromIndex?numberThe array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

Uint8Array.lastIndexOf

map(callbackfn, thisArg?): Uint8Array<ArrayBuffer>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2293

Calls a defined callback function on each element of an array, and returns an array that contains the results.

ParameterTypeDescription
callbackfn(value, index, array) => numberA function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
thisArg?anyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Uint8Array<ArrayBuffer>

Uint8Array.map

reduce(callbackfn): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2305

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

ParameterTypeDescription
callbackfn(previousValue, currentValue, currentIndex, array) => numberA function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

number

Uint8Array.reduce
reduce(callbackfn, initialValue): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2306

ParameterType
callbackfn(previousValue, currentValue, currentIndex, array) => number
initialValuenumber

number

Uint8Array.reduce
reduce<U>(callbackfn, initialValue): U;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2318

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type Parameter
U
ParameterTypeDescription
callbackfn(previousValue, currentValue, currentIndex, array) => UA function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
initialValueUIf initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

U

Uint8Array.reduce

reduceRight(callbackfn): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2330

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

ParameterTypeDescription
callbackfn(previousValue, currentValue, currentIndex, array) => numberA function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

number

Uint8Array.reduceRight
reduceRight(callbackfn, initialValue): number;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2331

ParameterType
callbackfn(previousValue, currentValue, currentIndex, array) => number
initialValuenumber

number

Uint8Array.reduceRight
reduceRight<U>(callbackfn, initialValue): U;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2343

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type Parameter
U
ParameterTypeDescription
callbackfn(previousValue, currentValue, currentIndex, array) => UA function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
initialValueUIf initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

U

Uint8Array.reduceRight

reverse(): this;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2348

Reverses the elements in an Array.

this

Uint8Array.reverse

set(array, offset?): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2355

Sets a value or an array of values.

ParameterTypeDescription
arrayArrayLike<number>A typed or untyped array of values to set.
offset?numberThe index in the current array at which the values are to be written.

void

Uint8Array.set

slice(start?, end?): Uint8Array<ArrayBuffer>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2362

Returns a section of an array.

ParameterTypeDescription
start?numberThe beginning of the specified portion of the array.
end?numberThe end of the specified portion of the array. This is exclusive of the element at the index ‘end’.

Uint8Array<ArrayBuffer>

Uint8Array.slice

some(predicate, thisArg?): boolean;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2372

Determines whether the specified callback function returns true for any element of an array.

ParameterTypeDescription
predicate(value, index, array) => unknownA function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
thisArg?anyAn object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

Uint8Array.some

sort(compareFn?): this;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2383

Sorts an array.

ParameterTypeDescription
compareFn?(a, b) => numberFunction used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they’re equal and a positive value otherwise. If omitted, the elements are sorted in ascending order. [11,2,22,1].sort((a, b) => a - b)

this

Uint8Array.sort

subarray(begin?, end?): Uint8Array<ArrayBufferLike>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2391

Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

ParameterTypeDescription
begin?numberThe index of the beginning of the array.
end?numberThe index of the end of the array.

Uint8Array<ArrayBufferLike>

Uint8Array.subarray

toLocaleString(): string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2396

Converts a number to a string by using the current locale.

string

Uint8Array.toLocaleString
toLocaleString(locales, options?): string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts:568

ParameterType
localesstring | string[]
options?NumberFormatOptions

string

Uint8Array.toLocaleString

toString(): string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2401

Returns a string representation of an array.

string

Uint8Array.toString

valueOf(): this;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:2404

Returns the primitive value of the specified object.

this

Uint8Array.valueOf

values(): ArrayIterator<number>;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts:328

Returns an list of values in the array

ArrayIterator<number>

Uint8Array.values