Skip to content

Feature Request: Support Infinity and NaN values in serializer #80

@timostamm

Description

@timostamm

Great to see built-in support for BigInt, Date, and Uint8Array!

I've noticed that Infinity and NaN serialize to null - maybe it's worth giving it the same special treatment like undefined?

E.g.:

import {serialize} from "capnweb";

console.log(serialize(Number.NaN)); // null
console.log(serialize(Number.POSITIVE_INFINITY)); // null
console.log(serialize(undefined)); // ["undefined"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions