mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibJS: Support BigInt number formatting with Intl.NumberFormat
This commit is contained in:
committed by
Linus Groh
parent
a0253af8c1
commit
d6e926e5b1
Notes:
sideshowbarker
2024-07-17 19:58:10 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/d6e926e5b1c Pull-request: https://github.com/SerenityOS/serenity/pull/12218 Reviewed-by: https://github.com/linusg ✅
@@ -44,10 +44,6 @@ ThrowCompletionOr<Value> NumberFormatFunction::call()
|
||||
// 4. Let x be ? ToNumeric(value).
|
||||
value = TRY(value.to_numeric(global_object));
|
||||
|
||||
// FIXME: Support BigInt number formatting.
|
||||
if (value.is_bigint())
|
||||
return vm.throw_completion<InternalError>(global_object, ErrorType::NotImplemented, "BigInt number formatting");
|
||||
|
||||
// 5. Return ? FormatNumeric(nf, x).
|
||||
// Note: Our implementation of FormatNumeric does not throw.
|
||||
auto formatted = format_numeric(global_object, m_number_format, value);
|
||||
|
||||
Reference in New Issue
Block a user