Skip to content

Commit 0ab711a

Browse files
authored
Fix typo (#58)
* Fix typo in error messages: then -> than * changesets
1 parent 6fc690b commit 0ab711a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+63
-58
lines changed

.changeset/crazy-regions-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@imgproxy/imgproxy-js-core": patch
3+
---
4+
5+
Fix typo in error messages: "then" -> "than"

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getMinNumText(
4141
): string {
4242
return `${getParamName(paramName)} value can't be less${
4343
isEqual ? " or equal" : ""
44-
} then ${value}${addInfo ? `. ${addInfo}` : ""}`;
44+
} than ${value}${addInfo ? `. ${addInfo}` : ""}`;
4545
}
4646

4747
export function guardIsNotNum(

tests/optionsBasic/adjust.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("adjust", () => {
2828

2929
it("should throw an error if brightness less than -255", () => {
3030
expect(() => build({ adjust: { brightness: -300 } })).toThrow(
31-
"adjust.brightness value can't be less then -255"
31+
"adjust.brightness value can't be less than -255"
3232
);
3333
});
3434

tests/optionsBasic/autoquality.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe("autoquality", () => {
3737

3838
it("should throw an error if autoquality.target is less than 0", () => {
3939
expect(() => build({ autoquality: { target: -1 } })).toThrow(
40-
"autoquality.target value can't be less then 0"
40+
"autoquality.target value can't be less than 0"
4141
);
4242
});
4343

@@ -50,7 +50,7 @@ describe("autoquality", () => {
5050

5151
it("should throw an error if autoquality.min_quality is less than 0", () => {
5252
expect(() => build({ autoquality: { min_quality: -1 } })).toThrow(
53-
"autoquality.min_quality value can't be less then 0"
53+
"autoquality.min_quality value can't be less than 0"
5454
);
5555
});
5656

@@ -69,7 +69,7 @@ describe("autoquality", () => {
6969

7070
it("should throw an error if autoquality.max_quality is less than 0", () => {
7171
expect(() => build({ autoquality: { max_quality: -1 } })).toThrow(
72-
"autoquality.max_quality value can't be less then 0"
72+
"autoquality.max_quality value can't be less than 0"
7373
);
7474
});
7575

@@ -89,7 +89,7 @@ describe("autoquality", () => {
8989
it("should throw an error if autoquality.allowed_error is less than 0", () => {
9090
expect(() =>
9191
build({ autoquality: { method: "ml", allowed_error: -1 } })
92-
).toThrow("autoquality.allowed_error value can't be less then 0");
92+
).toThrow("autoquality.allowed_error value can't be less than 0");
9393
});
9494

9595
it("should throw an error if autoquality.allowed_error is more than 1", () => {

tests/optionsBasic/backgroundAlpha.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("backgroundAlpha", () => {
2828

2929
it("should throw an error if background alpha less than 0", () => {
3030
expect(() => build({ background_alpha: -0.5 })).toThrow(
31-
"background_alpha option value can't be less then 0"
31+
"background_alpha option value can't be less than 0"
3232
);
3333
});
3434

tests/optionsBasic/blur.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("blur", () => {
2727

2828
it("should throw an error if blur is less than 0", () => {
2929
expect(() => build({ bl: -1 })).toThrow(
30-
"blur option value can't be less then 0"
30+
"blur option value can't be less than 0"
3131
);
3232
});
3333

tests/optionsBasic/brightness.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe("brightness", () => {
3535

3636
it("should throw an error if brightness is less than -255", () => {
3737
expect(() => build({ brightness: -275 })).toThrow(
38-
"brightness option value can't be less then -255"
38+
"brightness option value can't be less than -255"
3939
);
4040
});
4141

tests/optionsBasic/contrast.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("contrast", () => {
3030

3131
it("should throw an error if contrast is less than 0", () => {
3232
expect(() => build({ contrast: -1 })).toThrow(
33-
"contrast option value can't be less then 0"
33+
"contrast option value can't be less than 0"
3434
);
3535
});
3636

tests/optionsBasic/cropAspectRatio.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("cropAspectRatio", () => {
4343
expect(() =>
4444
build({ crop_aspect_ratio: { aspect_ratio: -1 } })
4545
).toThrowError(
46-
"crop_aspect_ratio.aspect_ratio value can't be less then 0"
46+
"crop_aspect_ratio.aspect_ratio value can't be less than 0"
4747
);
4848
});
4949

tests/optionsBasic/dpr.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("dpr", () => {
2424

2525
it("should throw an error if dpr is less than 0", () => {
2626
expect(() => build({ dpr: -1 })).toThrow(
27-
"dpr option value can't be less then 0"
27+
"dpr option value can't be less than 0"
2828
);
2929
});
3030

0 commit comments

Comments
 (0)