Skip to content

ntcore-ts / @ntcore-ts/client / pack

Function: pack()

pack(value, descriptor): Uint8Array

Defined in: struct/struct-codec.ts:29

Packs a plain object into a little-endian Uint8Array using the struct descriptor.

Parameters

value

StructPlainObject

descriptor

StructDescriptor

Returns

Uint8Array

Throws

Error if value is missing required fields or has invalid types.

Released under the MIT License.