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

    Variable realMapTagConst

    realMapTag: MappingTagDefinition<Map<unknown, unknown>, Map<unknown, unknown>> = ...

    Recommended when non-string keys are actually needed. It uses native JavaScript Map objects, so keys keep their constructed types instead of being converted to strings.

    It is not the default to avoid widespread breaking changes in existing projects. Map has a different access API and does not pass deep equality checks against {}-based fixtures. Alongside the other changes in v5, making it the default was considered too disruptive.

    If these differences are acceptable for your project, we recommend using realMapTag to guarantee the absence of problems and side effects.

    Enable realMapTag:

    import { load, CORE_SCHEMA, realMapTag } from 'js-yaml'

    try {
    load(data, { schema: CORE_SCHEMA.withTags(realMapTag) })
    } catch (e) {
    console.error(e)
    }