smol-toml
smol-toml copied to clipboard
Deserialize integers beyond 53bits as bigint
import toml from 'smol-toml'
toml.parse('a=9223372036854775807')
Expected: { a: 9223372036854775807n }
Seen: Exception (Invalid TOML document: integer value cannot be represented losslessly)
This is more of a feature req than a bug; the choice was to error for the time being to avoid silently converting to bigint by default (noisy vs silent approach). BigInt support is planned, eventually:tm:
Really need this