js-yaml - v5.3.0
    Preparing search index...

    Interface DumpOptions

    interface DumpOptions {
        indent?: number;
        seqNoIndent?: boolean;
        seqInlineFirst?: boolean;
        sortKeys?: boolean | ((a: any, b: any) => number);
        lineWidth?: number;
        flowBracketPadding?: boolean;
        flowSkipCommaSpace?: boolean;
        flowSkipColonSpace?: boolean;
        quoteFlowKeys?: boolean;
        quoteStyle?: "single" | "double";
        forceQuotes?: boolean;
        tagBeforeAnchor?: boolean;
        schema?: Schema;
        skipInvalid?: boolean;
        noRefs?: boolean;
        flowLevel?: number;
        transform?: (documents: Document[]) => void;
    }

    Hierarchy

    Index

    Indentation width in spaces.

    2

    Does not add an indentation level to array elements when enabled.

    false

    Allows a nested collection to start on the same line after -.

    true

    Sorts mapping keys when true. A function can be provided to define the sort order.

    false

    Maximum line width. Set to -1 for unlimited width.

    80

    Adds spaces inside flow collection brackets: {a: 1} becomes { a: 1 }.

    false

    Omits the space after commas in flow collections: [1, 2] becomes [1,2].

    false

    Omits the space after : in flow mappings: {a: 1} becomes {a:1}.

    false

    Quotes flow mapping keys: {a: 1} becomes {"a": 1}.

    false

    Quoting style to use when a string needs quotes.

    'single'

    Quotes all non-key strings using quoteStyle.

    false

    Prints an explicit tag before an anchor: &ref_0 !!set becomes !!set &ref_0.

    false

    Schema to use.

    DUMP_SCHEMA

    Skips invalid types instead of throwing. Invalid mapping pairs and sequence items are skipped; undefined sequence items are serialized as null.

    false

    Inlines duplicate objects instead of converting them into references.

    false

    Nesting level at which collections switch from block to flow style. Set to -1 to never switch automatically.

    -1

    Mutates the generated AST before it is rendered.