Skip to content

MetadataBlock

Defined in: src/backends/single_buffer.ts:67

A block of metadata for a single-buffer file system. This metadata maps IDs (for inodes and data) to actual offsets in the buffer. This is done since IDs are not guaranteed to be sequential.

  • Int32Array<ArrayBuffer, this>

[index: number]: number

new MetadataBlock(buffer, byteOffset?, byteLength?): MetadataBlock

Defined in: node_modules/memium/dist/decorators.d.ts:62

ArrayBufferLike

number

number

MetadataBlock

$from.typed(Int32Array)<ArrayBufferLike>.constructor

protected optional _previous?: MetadataBlock

Defined in: src/backends/single_buffer.ts:86


readonly [toStringTag]: "Int32Array"

Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:298

$from.typed(Int32Array).[toStringTag]


readonly buffer: ArrayBuffer

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3298

The ArrayBuffer instance referenced by the array.

$from.typed(Int32Array).buffer


readonly byteLength: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3303

The length in bytes of the array.

$from.typed(Int32Array).byteLength


readonly byteOffset: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3308

The offset in bytes of the array.

$from.typed(Int32Array).byteOffset


readonly BYTES_PER_ELEMENT: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3293

The size in bytes of each element in the array.

$from.typed(Int32Array).BYTES_PER_ELEMENT


readonly constructor: typeof MetadataBlock

Defined in: src/backends/single_buffer.ts:70

The initial value of Object.prototype.constructor is the standard built-in Object constructor.


readonly length: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3407

The length of the array.

$from.typed(Int32Array).length


readonly static alignment: number

Defined in: node_modules/memium/dist/structs.shared.d.ts:11

SuperBlock.alignment


readonly static optional array?: TypeArrayConstructor<ArrayBufferView<ArrayBufferLike>>

Defined in: node_modules/memium/dist/types.d.ts:14

$from.typed(Int32Array).array


readonly static optional BYTES_PER_ELEMENT?: number

Defined in: node_modules/memium/dist/decorators.d.ts:65

SuperBlock.BYTES_PER_ELEMENT


readonly static optional isDynamic?: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:13

SuperBlock.isDynamic


readonly static isUnion: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:12

SuperBlock.isUnion


static name: string = 'MetadataBlock'

Defined in: src/backends/single_buffer.ts:68

Returns the name of the function. Function names are read-only and can not be changed.

$from.typed(Int32Array).name


readonly static size: number

Defined in: node_modules/memium/dist/types.d.ts:13

SuperBlock.size

Defined in: src/backends/single_buffer.ts:78

The crc32c checksum for the metadata block.


Defined in: src/backends/single_buffer.ts:95

Metadata entries.


Defined in: src/backends/single_buffer.ts:120

If non-zero, this block is locked for writing. Note a int32 is used for Atomics.wait


get previous(): MetadataBlock | undefined

Defined in: src/backends/single_buffer.ts:88

MetadataBlock | undefined


Defined in: src/backends/single_buffer.ts:84

Offset to the previous metadata block


Defined in: src/backends/single_buffer.ts:81

The (last) time this metadata block was updated

[iterator](): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:458

ArrayIterator<number>

$from.typed(Int32Array).[iterator]


at(index): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2022.array.d.ts:78

Returns the item located at the specified index.

number

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

number | undefined

$from.typed(Int32Array).at


copyWithin(target, start, end?): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3319

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

number

If target is negative, it is treated as length+target where length is the length of the array.

number

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

number

If not specified, length of the this object is used as its default value.

this

$from.typed(Int32Array).copyWithin


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

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:463

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

ArrayIterator<[number, number]>

$from.typed(Int32Array).entries


every(predicate, thisArg?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3329

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

(value, index, array) => unknown

A 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.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

$from.typed(Int32Array).every


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

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3339

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

number

value to fill array section with

number

index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

number

index to stop filling the array at. If end is negative, it is treated as length+end.

this

$from.typed(Int32Array).fill


filter(predicate, thisArg?): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3348

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

(value, index, array) => any

A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Int32Array<ArrayBuffer>

$from.typed(Int32Array).filter


find(predicate, thisArg?): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3359

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

(value, index, obj) => boolean

find 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.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number | undefined

$from.typed(Int32Array).find


findIndex(predicate, thisArg?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3370

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

(value, index, obj) => boolean

find 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.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number

$from.typed(Int32Array).findIndex


findLast<S>(predicate, thisArg?): S | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:510

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

S extends number

(value, index, array) => value is S

findLast calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLast immediately returns that element value. Otherwise, findLast returns undefined.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

S | undefined

$from.typed(Int32Array).findLast

findLast(predicate, thisArg?): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:518

(value, index, array) => unknown

any

number | undefined

$from.typed(Int32Array).findLast


findLastIndex(predicate, thisArg?): number

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:532

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

(value, index, array) => unknown

findLastIndex calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number

$from.typed(Int32Array).findLastIndex


forEach(callbackfn, thisArg?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3379

Performs the specified action for each element in an array.

(value, index, array) => void

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

void

$from.typed(Int32Array).forEach


includes(searchElement, fromIndex?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es2016.array.include.d.ts:86

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

number

The element to search for.

number

The position in this array at which to begin searching for searchElement.

boolean

$from.typed(Int32Array).includes


indexOf(searchElement, fromIndex?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3387

Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

number

The value to locate in the array.

number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

$from.typed(Int32Array).indexOf


join(separator?): string

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3394

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

string

A 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

$from.typed(Int32Array).join


keys(): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:468

Returns an list of keys in the array

ArrayIterator<number>

$from.typed(Int32Array).keys


lastIndexOf(searchElement, fromIndex?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3402

Returns the index of the last occurrence of a value in an array, or -1 if it is not present.

number

The value to locate in the array.

number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

$from.typed(Int32Array).lastIndexOf


lock(): SBLock

Defined in: src/backends/single_buffer.ts:142

SBLock


map(callbackfn, thisArg?): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3417

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

(value, index, array) => number

A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Int32Array<ArrayBuffer>

$from.typed(Int32Array).map


reduce(callbackfn): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3429

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.

(previousValue, currentValue, currentIndex, array) => number

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

number

$from.typed(Int32Array).reduce

reduce(callbackfn, initialValue): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3430

(previousValue, currentValue, currentIndex, array) => number

number

number

$from.typed(Int32Array).reduce

reduce<U>(callbackfn, initialValue): U

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3442

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.

U

(previousValue, currentValue, currentIndex, array) => U

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

U

If 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

$from.typed(Int32Array).reduce


reduceRight(callbackfn): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3454

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.

(previousValue, currentValue, currentIndex, array) => number

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

number

$from.typed(Int32Array).reduceRight

reduceRight(callbackfn, initialValue): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3455

(previousValue, currentValue, currentIndex, array) => number

number

number

$from.typed(Int32Array).reduceRight

reduceRight<U>(callbackfn, initialValue): U

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3467

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.

U

(previousValue, currentValue, currentIndex, array) => U

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

U

If 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

$from.typed(Int32Array).reduceRight


reverse(): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3472

Reverses the elements in an Array.

this

$from.typed(Int32Array).reverse


set(array, offset?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3479

Sets a value or an array of values.

ArrayLike<number>

A typed or untyped array of values to set.

number

The index in the current array at which the values are to be written.

void

$from.typed(Int32Array).set


slice(start?, end?): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3486

Returns a section of an array.

number

The beginning of the specified portion of the array.

number

The end of the specified portion of the array. This is exclusive of the element at the index ‘end’.

Int32Array<ArrayBuffer>

$from.typed(Int32Array).slice


some(predicate, thisArg?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3496

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

(value, index, array) => unknown

A 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.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

$from.typed(Int32Array).some


sort(compareFn?): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3507

Sorts an array.

(a, b) => number

Function 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

$from.typed(Int32Array).sort


subarray(begin?, end?): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3515

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

number

The index of the beginning of the array.

number

The index of the end of the array.

Int32Array<ArrayBuffer>

$from.typed(Int32Array).subarray


toLocaleString(): string

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3520

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

string

$from.typed(Int32Array).toLocaleString

toLocaleString(locales, options?): string

Defined in: ../../node_modules/typescript/lib/lib.es2015.core.d.ts:582

string | string[]

NumberFormatOptions

string

$from.typed(Int32Array).toLocaleString


toReversed(): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:540

Copies the array and returns the copy with the elements in reverse order.

Int32Array<ArrayBuffer>

$from.typed(Int32Array).toReversed


toSorted(compareFn?): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:552

Copies and sorts the array.

(a, b) => number

Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they’re equal, and a positive value otherwise. If omitted, the elements are sorted in ascending order.

const myNums = Int32Array.from([11, 2, -22, 1]);
myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]

Int32Array<ArrayBuffer>

$from.typed(Int32Array).toSorted


toString(long?): string

Defined in: src/backends/single_buffer.ts:97

Returns a string representation of an array.

boolean = false

string

$from.typed(Int32Array).toString


valueOf(): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3528

Returns the primitive value of the specified object.

this

$from.typed(Int32Array).valueOf


values(): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:473

Returns an list of values in the array

ArrayIterator<number>

$from.typed(Int32Array).values


waitUnlocked(depth?): void

Defined in: src/backends/single_buffer.ts:125

Wait for the block to be unlocked.

number = 0

void


with(index, value): Int32Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:561

Copies the array and inserts the given number at the provided index.

number

The index of the value to overwrite. If the index is negative, then it replaces from the end of the array.

number

The value to insert into the copied array.

Int32Array<ArrayBuffer>

A copy of the original array with the inserted value.

$from.typed(Int32Array).with


static get(this, buffer, offset): ArrayBufferView

Defined in: node_modules/memium/dist/types.d.ts:17

Get a value from a buffer

void

ArrayBufferLike

number

ArrayBufferView

$from.typed(Int32Array).get


static set(this, buffer, offset, value): void

Defined in: node_modules/memium/dist/types.d.ts:19

Set a value in a buffer

void

ArrayBufferLike

number

ArrayBufferView

void

$from.typed(Int32Array).set