Skip to content

assemble

assemble<T>(kvs): T

Defined in: packages/store-kit/src/objects/state.ts:18

Assembles a structured object from a list of key-value pairs, processes the keys by removing a predefined prefix, and parses the values as BigInt.

Type Parameters

T

Parameters

kvs

KeyValue[]

An array of key-value pairs where each pair contains a key as a string and a value to be processed.

Returns

T

A structured object of type T, assembled and sorted by keys.