NodeOPCUA API Documentation
    Preparing search index...

    Interface NodesetDocument

    a document handed to a format, in whichever shape that format finds convenient. Every accessor inflates first when the document was gzipped, and the results are computed once and shared, so a format that asks for both the lines and the bytes pays for one inflate.

    interface NodesetDocument {
        name: string;
        bytes(): Promise<Uint8Array<ArrayBufferLike>>;
        chunks(): AsyncIterable<NodesetChunk>;
        digest(): string | undefined;
        lines(): Promise<string[]>;
        rawBytes(): Promise<Uint8Array<ArrayBufferLike>>;
        readHead(complete: (text: string) => boolean): Promise<string>;
        text(): Promise<string>;
    }
    Index
    name: string
    • read from the start until complete(text) holds, or the document ends. What was read stays in the document and is delivered again, first, by NodesetDocument.chunks, so a format that reads a header this way has not spent the source.

      This is how a format avoids reading a body it does not need: the XML header pre-pass stops after a few hundred bytes of a four megabyte file.

      Parameters

      • complete: (text: string) => boolean

      Returns Promise<string>