Skip to content

function goType(val) returns int64 instead of float64 #80

@zen37

Description

@zen37

If val = 12345678901234567890 or 12345678901234567890.5 float64 should be returned instead of int64.

case "number": if (val % 1 === 0) { if (val > -2147483648 && val < 2147483647) return "int"; else return "int64"; } else return "float64";

should be replaced with

case "number": if (val % 1 === 0) { if (val > -2147483648 && val < 2147483647) return "int"; else if (val > -9223372036854775808 && val < 9223372036854775807) return "int64"; } return "float64";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions