@gmb/bitmark-parser - v7.21.2
    Preparing search index...

    Interface TransformOptions

    Options for the transform function.

    interface TransformOptions {
        applyProposals?: boolean;
        by?: string;
        date?: string;
        indent?: number;
        inlineStyle?: InlineStyle;
        inputFormat?: InputFormat;
        mode?: OutputMode;
        outputFormat?: OutputFormat;
        patch?: string | PatchEntry[] | PatchDocument;
        postHook?: PostHook;
        preHook?: PreHook;
        pretty?: boolean;
        spacesAroundValues?: number;
        workers?: number;
    }
    Index
    applyProposals?: boolean

    Apply the change proposals the input itself carries ([.bit-diff], review notes with patch cards) and mark each applied one resolved (PLAN-264). A failed proposal leaves its target untouched and throws a PatchError.

    by?: string

    With applyProposals: who is recorded as having resolved them.

    date?: string

    With applyProposals: the resolution date recorded (default: today, UTC).

    indent?: number

    Indent size for pretty-printing (default: 2).

    inlineStyle?: InlineStyle

    Bitmark output only: write inline marks classically ("classic", default — **bold**, ==x==|bold|) or as toggle tags ("toggle" — (+bold)x(-bold)). A mark with only one spelling keeps it.

    inputFormat?: InputFormat

    Input format (default: "auto").

    mode?: OutputMode

    Output mode (default: "optimized").

    outputFormat?: OutputFormat

    Output format (default: "json").

    patch?: string | PatchEntry[] | PatchDocument

    A patch document (PLAN-179) — per-bit patches by selector, removes, replacements, inserts and moves — or the every-bit shorthand: a bare array of entries applied to every bit. Either form may be given as a JSON string. A string of bitmark is CHANGE PROPOSALS ([.bit-diff] bits, PLAN-264; diff(…, { outputFormat: "bitmark-patch" }) writes them), applied to the input.

    postHook?: PostHook

    Per-bit post-hook, run on the calling thread after each bit is rendered.

    preHook?: PreHook

    Per-bit pre-hook, run on the calling thread. Returns patches (applied after the static patch), an output-format override, or drop. Providing a preHook or postHook switches transform to the per-bit path; with neither, the whole document is transformed in a single pass.

    pretty?: boolean

    Prettify the emitted JSON (default: false) — for bitmark output, the embedded JSON bodies of json-format bits.

    spacesAroundValues?: number

    Spaces around tag values in bitmark output, 0..=10 (default: 1).

    workers?: number

    Worker-thread count for transformParallel (Node only; default 4). Ignored by the synchronous transform.