Documentation / @sw-file-lib/core / serializeComponentMod
Function: serializeComponentMod()
ts
function serializeComponentMod(componentMod: ComponentMod): Uint8Array<ArrayBuffer>;Defined in: componentMod/index.ts:159
Serializes a component mod into its binary format.
If componentMod.name is provided, version 1 is written; otherwise, the legacy version 0 format is produced.
String assets are encoded as UTF-8.
Parameters
| Parameter | Type | Description |
|---|---|---|
componentMod | ComponentMod | Component mod to serialize. |
Returns
Uint8Array<ArrayBuffer>
The serialized binary data.