1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 12:55:07 +00:00
Commit graph

1 commit

Author SHA1 Message Date
Andreas Kling
e6dadd9e5b LibJS: Implement parseInt()
Here's a reasonably faithful implementation of ECMAScript 2021 18.2.5.
Some corner cases are not covered, I've left them as FIXME's in the
included unit test.

Also I had to tweak JS::Value::to_i32() to always convert infinity to
zero, which is in accordance with ToInt32 AFAICT.
2020-12-05 13:55:55 +01:00