mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Support BigInt number formatting with Intl.NumberFormat
This commit is contained in:
committed by
Linus Groh
parent
a0253af8c1
commit
d6e926e5b1
@@ -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