1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

Everywhere: Fix spelling mistakes

This commit is contained in:
mjz19910 2022-01-07 05:04:05 -07:00 committed by Linus Groh
parent 168063819d
commit 10ec98dd38
56 changed files with 90 additions and 90 deletions

View file

@ -13,7 +13,7 @@
namespace JS::Intl {
// 13 ListFomat Objects, https://tc39.es/ecma402/#listformat-objects
// 13 ListFormat Objects, https://tc39.es/ecma402/#listformat-objects
ListFormat::ListFormat(Object& prototype)
: Object(prototype)
{

View file

@ -1589,7 +1589,7 @@ int compute_exponent(NumberFormat& number_format, double number)
int magnitude = log10floor(number);
// 4. Let exponent be ComputeExponentForMagnitude(numberFormat, magnitude).
int exponent = compute_exponent_for_magniude(number_format, magnitude);
int exponent = compute_exponent_for_magnitude(number_format, magnitude);
// 5. Let x be x × 10^(-exponent).
number *= pow(10, -exponent);
@ -1613,11 +1613,11 @@ int compute_exponent(NumberFormat& number_format, double number)
}
// 10. Return ComputeExponentForMagnitude(numberFormat, magnitude + 1).
return compute_exponent_for_magniude(number_format, magnitude + 1);
return compute_exponent_for_magnitude(number_format, magnitude + 1);
}
// 15.1.17 ComputeExponentForMagnitude ( numberFormat, magnitude ), https://tc39.es/ecma402/#sec-computeexponentformagnitude
int compute_exponent_for_magniude(NumberFormat& number_format, int magnitude)
int compute_exponent_for_magnitude(NumberFormat& number_format, int magnitude)
{
// 1. Let notation be numberFormat.[[Notation]].
switch (number_format.notation()) {

View file

@ -220,6 +220,6 @@ ThrowCompletionOr<void> set_number_format_unit_options(GlobalObject& global_obje
Optional<Variant<StringView, String>> get_number_format_pattern(NumberFormat& number_format, double number, Unicode::NumberFormat& found_pattern);
Optional<StringView> get_notation_sub_pattern(NumberFormat& number_format, int exponent);
int compute_exponent(NumberFormat& number_format, double number);
int compute_exponent_for_magniude(NumberFormat& number_format, int magnitude);
int compute_exponent_for_magnitude(NumberFormat& number_format, int magnitude);
}

View file

@ -563,7 +563,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match)
// 3. If matchStr is the empty String, then
if (match_str.is_empty()) {
// Stepsp 3a-3c are implemented by increment_last_index.
// Steps 3a-3c are implemented by increment_last_index.
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
}
@ -682,7 +682,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
// 2. If matchStr is the empty String, then
if (match_str.is_empty()) {
// Stepsp 2a-2c are implemented by increment_last_index.
// Steps 2a-2c are implemented by increment_last_index.
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
}
}

View file

@ -273,7 +273,7 @@ describe("dayPeriod", () => {
describe("hour", () => {
// prettier-ignore
// FIXME: The 2-digit results are supposed to include {ampm}. These results are acheived from the "HH"
// FIXME: The 2-digit results are supposed to include {ampm}. These results are achieved from the "HH"
// pattern, which should only be applied to 24-hour cycles.
const data = [
{ hour: "2-digit", en0: "05", en1: "07", ar0: "٠٥", ar1: "٠٧" },

View file

@ -3,7 +3,7 @@ test("length is 2", () => {
});
describe("errors", () => {
test("non-object protpotype value", () => {
test("non-object prototype value", () => {
expect(() => Object.create(42)).toThrowWithMessage(
TypeError,
"Prototype must be an object or null"

View file

@ -64,7 +64,7 @@ describe("only allowed in async functions", () => {
expect("(function* () { for await (const v of []) return v; })").not.toEval();
});
test("async genrator functions", () => {
test("async generator functions", () => {
expect("async function* foo() { for await (const v of []) yield v; }").toEval();
expect("(async function* () { for await (const v of []) yield v; })").toEval();
});