MCPcopy Create free account
hub / github.com/callstackincubator/polygen / readVector

Function readVector

packages/wasm-parser/src/reader/utils.ts:58–64  ·  view source on GitHub ↗
(
  reader: BinaryReader,
  readFunction: () => TResult
)

Source from the content-addressed store, hash-verified

56 * @returns An array of elements of type `TResult` read from the binary source using the provided `readFunction`.
57 */
58export function readVector<TResult>(
59 reader: BinaryReader,
60 readFunction: () => TResult
61): TResult[] {
62 const length = reader.readUnsignedLEB128();
63 return Array.from({ length }).map(() => readFunction());
64}

Callers 8

readResultTypeFunction · 0.85
readTypeSectionFunction · 0.85
readImportSectionFunction · 0.85
readFunctionSectionFunction · 0.85
readTableSectionFunction · 0.85
readMemorySectionFunction · 0.85
readGlobalSectionFunction · 0.85
readExportSectionFunction · 0.85

Calls 1

readUnsignedLEB128Method · 0.80

Tested by

no test coverage detected