CreateNodeOptions: {
    aliasDuplicateObjects?: boolean;
    anchorPrefix?: string;
    flow?: boolean;
    keepUndefined?: boolean | null;
    onTagObj?: ((tagObj: ScalarTag | CollectionTag) => void);
    tag?: string;
}

Type declaration

  • OptionalaliasDuplicateObjects?: boolean

    During node construction, use anchors and aliases to keep strictly equal non-null objects as equivalent in YAML.

    Default: true

  • OptionalanchorPrefix?: string

    Default prefix for anchors.

    Default: 'a', resulting in anchors a1, a2, etc.

  • Optionalflow?: boolean

    Force the top-level collection node to use flow style.

  • OptionalkeepUndefined?: boolean | null

    Keep undefined object values when creating mappings, rather than discarding them.

    Default: false

  • OptionalonTagObj?: ((tagObj: ScalarTag | CollectionTag) => void)
  • Optionaltag?: string

    Specify the top-level collection type, e.g. "!!omap". Note that this requires the corresponding tag to be available in this document's schema.