Skip to content

Serialize Infinity, -Infinity, -0 correctly #318

@GarboMuffin

Description

@GarboMuffin

they currently all become 0

@Geotale says that we can use 1e999 instead which becomes Infinity

it also looks like JSON.parse understands -0 it just doesn't stringify that way by default

don't think we can do anything about NaN

seems like we could put all this into @turbowarp/json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions