/* * Copyright (c) 2023, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace JS { template ThrowCompletionOr deprecated_format(VM& vm, CheckedFormatString&& fmtstr, Args const&... args) { StringBuilder builder; AK::VariadicFormatParams parameters { args... }; TRY_OR_THROW_OOM(vm, vformat(builder, fmtstr.view(), parameters)); return builder.to_deprecated_string(); } }