Skip to content

Bigint becomes "undefined" #69

Description

@5cover

HJSON coerces invalid values to the string "undefined".

❯ HJSON.stringify(10n)
"undefined"
❯ HJSON.stringify([10n])
"[\n  undefined\n]"

Same for bigint, undefined, functions and symbols.

For values not supported, it might be preferable to throw or to coerce to undefined (not the string).

This would however be a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions