toml-node icon indicating copy to clipboard operation
toml-node copied to clipboard

Loose type check between Integer and Float. Both of them are the same in the javascript context.

Open yoheiMune opened this issue 7 years ago • 2 comments

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.

yoheiMune avatar Feb 24 '17 14:02 yoheiMune

@BinaryMuse Any chance to get this merged?

hshindo avatar Mar 02 '17 14:03 hshindo

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.

BinaryMuse avatar Mar 31 '17 04:03 BinaryMuse