1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:25:06 +00:00
serenity/Libraries/LibJS
Linus Groh 00fe7f82c0 LibJS: Treat NaN in Value::to_i32() as zero
Let's treat it as zero like the ECMAScript spec does in toInteger().

That way we can use to_i32() and don't have to care about weird input
input values where a number is expected, i.e.

"foo".charAt() === "f"
"foo".charAt("bar") === "f"
"foo".charAt(0) === "f"
2020-05-23 16:39:17 +02:00
..
Heap Build: Make Lagom build under macOS (#2341) 2020-05-23 15:31:30 +02:00
Runtime LibJS: Treat NaN in Value::to_i32() as zero 2020-05-23 16:39:17 +02:00
Tests LibJS: Treat NaN in Value::to_i32() as zero 2020-05-23 16:39:17 +02:00
AST.cpp LibJS: Add object literal getter/setter shorthand 2020-05-22 10:59:05 +02:00
AST.h LibJS: Add object literal getter/setter shorthand 2020-05-22 10:59:05 +02:00
CMakeLists.txt LibJS: Add symbol objects 2020-05-17 18:05:15 +02:00
Console.cpp LibJS: Add side-effect-free version of Value::to_string() 2020-05-15 13:50:42 +02:00
Console.h LibJS: Implement ConsoleClient 2020-05-05 09:15:16 +02:00
Forward.h LibJS: Add getter/setter support 2020-05-21 22:56:18 +02:00
Interpreter.cpp LibJS: Add symbol objects 2020-05-17 18:05:15 +02:00
Interpreter.h LibJS: Make Interpreter::call() this_value a required argument 2020-05-21 15:18:08 +02:00
Lexer.cpp LibJS: Remove syntax errors from lexer 2020-05-15 09:53:52 +02:00
Lexer.h LibJS: Remove syntax errors from lexer 2020-05-15 09:53:52 +02:00
Parser.cpp LibJS: Add object literal getter/setter shorthand 2020-05-22 10:59:05 +02:00
Parser.h LibJS: Handle hex and unicode escape sequences in string literals 2020-05-18 17:58:17 +02:00
Token.cpp LibJS: Handle hex and unicode escape sequences in string literals 2020-05-18 17:58:17 +02:00
Token.h LibJS: Handle hex and unicode escape sequences in string literals 2020-05-18 17:58:17 +02:00