Open
Description
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's trace
prints those decimal places, while JS's trace
does not.
trace("hello world", 3, 1, 2, 3.5);
// trace: hello world 1.0 2.0 3.5
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.