Skip to content

Missing support for negative zero #83

Description

@Janpot

Came across this while evaluating this library. It looks like it supports Infinity and NaN (not sure if it's an oversight, but these are not included in the table in the readme), but it doesn't seem to support serializing negative 0.

const input = 1 / -Infinity; // -0
console.log(1 / input);
// -Infinity
console.log(1 / superjson.parse(superjson.stringify(input)));
// Infinity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions