While implementing WASI's trace I noticed that we currently don't have the utility in place to omit trailing decimal .0s when converting a float to a string, like JS would do. As a result, WASI's trace prints those decimal places, while JS's trace does not.
Oops, I just ran into the missing .toFixed today :joy: No worries though! I don't actually "need" it. But I'm commenting here, so I can remember to open a PR for it if I get the time :smile:
While implementing WASI's
trace
I noticed that we currently don't have the utility in place to omit trailing decimal.0
s when converting a float to a string, like JS would do. As a result, WASI'strace
prints those decimal places, while JS'strace
does not.This looks like it is not quite the same but similar in nature to
toFixed
, and looking into both instead of implementing workarounds might be ideal.