Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Es6 and typescript fixes all this.


"Es6 and typescript fixes all this."

ES6 doesn't fix any of it, typescript fixes some of it.


ES6 adds isNaN and isFinite static methods to Number that don't convert their argument to a number first, so Klathmon's version works. But I don't make any claim about whether it's correct or not.

https://babeljs.io/repl/#?babili=false&evaluate=true&lineWra...

Compare step 1 of http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-nu... with http://www.ecma-international.org/ecma-262/6.0/#sec-number.i...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: