ToJSOptions: {
    mapAsMap?: boolean;
    maxAliasCount?: number;
    onAnchor?: ((value: unknown, count: number) => void);
    reviver?: Reviver;
}

Type declaration

  • OptionalmapAsMap?: boolean

    Use Map rather than Object to represent mappings.

    Default: false

  • OptionalmaxAliasCount?: number

    Prevent exponential entity expansion attacks by limiting data aliasing count; set to -1 to disable checks; 0 disallows all alias nodes.

    Default: 100

  • OptionalonAnchor?: ((value: unknown, count: number) => void)

    If defined, called with the resolved value and reference count for each anchor in the document.

      • (value, count): void
      • Parameters

        • value: unknown
        • count: number

        Returns void

  • Optionalreviver?: Reviver