Skip to content

Latest commit

 

History

History
122 lines (70 loc) · 3.98 KB

index.md

File metadata and controls

122 lines (70 loc) · 3.98 KB

Table of Contents

index.js:42-47

encodes the type annotations

Parameters

Returns Buffer

encodePersist

index.js:86-95

encodes the type annoations for persist

Parameters

  • annotations
  • stream buffer-pipe? (optional, default new Stream())
  • annoations Object

Returns Buffer

decodePersist

index.js:102-128

decodes the persist annotations

Parameters

encodeTypeMap

index.js:136-143

encodes a typeMap definition

Parameters

  • definition Object
  • stream buffer-pipe? (optional, default new Stream())

Returns Buffer

decodeTypeMap

index.js:150-164

decodes the TypeMap section

Parameters

encodeType

index.js:172-193

encodes the type annotations

Parameters

  • annotations
  • stream buffer-pipe? (optional, default new Stream())
  • definition Object

Returns Buffer

decodeType

index.js:200-240

decodes the Type section

Parameters

injectCustomSection

index.js:248-252

injects custom sections into a wasm binary

Parameters

  • custom Buffer the custom section(s)
  • wasm Buffer the wasm binary

Returns Buffer

encodeAndInject

index.js:259-262

encodes a json definition and injects it into a wasm binary

Parameters

  • annotation Object the type definition
  • wasm Buffer the wasm binary to inject