How to Stop parseFloat From Accepting Garbage
parseFloat accepts partial input and hides bugs.

How to Stop parseFloat From Accepting Garbage
parseFloat accepts partial input and hides bugs.

#JavaScript For the umpteenth time I hate string to number conversion. Given an input for a number like
3
3.1
-0.314e2
314e-2
but **NOT**
314e-2nowIhitthekeyboardwithmyforehead
and **not** the empty string, which is not a number.🤬 Leading and trailing space? Well, OK. At most.
Number(cruft) => empty string is 0
parseFloat() => allows trailing cruft
Solutions found: regexp+parseFloat or compare with back-conversion.
Really? Am I missing a modern api?