toml-node
toml-node copied to clipboard
Loose type check between Integer and Float. Both of them are the same in the javascript context.
Hi,
I got the error at loading a toml file below.
position = [51.01973684210527,15]
In JS context, both Float
and Integer
are the same type - Number
, so I think, there is no need to distinguish between them.
I hope you check my change. Thank you.
@BinaryMuse Any chance to get this merged?
I'm not 100% sure this is per spec (that arrays can contain both floats and ints if the underlying language treats them the same). Curious if @mojombo has thoughts.
Even if not, I could imagine a "loose mode" or something that might allow this.