zcap-spec-examples - v0.2.0
    Preparing search index...

    Function extractExamplesFromHtml

    • Extract every example from an HTML string you already hold in memory.

      The synchronous counterpart to extractExamples. Use this when you have the whole document as a string anyway; prefer extractExamples when reading from the network or a file, so the document never has to be buffered in full.

      Parameters

      Returns ZcapSpecExample[]

      One object per example, in document order. Empty if none are found.

      const examples = extractExamplesFromHtml(await readFile("index.html", "utf8"));