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

    Class ZcapSpecExamplesCli

    The CLI's behaviour, with every runtime detail injected.

    You only need this if you are embedding the command-line behaviour in something other than Node — a test harness, a worker, a browser. To just get the data, use extractExamples instead.

    let out = "";
    const cli = new ZcapSpecExamplesCli({
    fetch: (url) => fetch(url),
    readStdin: async () => html, // pretend this was piped in
    writeStdout: (chunk) => { out += chunk; },
    writeStderr: (chunk) => console.error(chunk),
    });
    const exitCode = await cli.run({ format: "json" });
    Index