@mathias @filedescriptor
Given
a = Number(1);
Is there a way to get the primitive value of a without valueOf being called?
-
-
Replying to @peterjaric @filedescriptor
If some loss of precision is acceptable: Number(a.toString());
1 reply 0 retweets 2 likes -
Replying to @mathias
Thanks, perfect! I'm only dealing with small integers, so that's no problem.
@filedescriptor1 reply 0 retweets 0 likes
Replying to @peterjaric @filedescriptor
Number(String(x)) …is the new… JSON.parse(JSON.stringify(x))
1:18 PM - 17 Nov 2016
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.