Skip to content

Commit 7522aa3

Browse files
committed
chore: fixes typo found in the key.ts file
1 parent b74c668 commit 7522aa3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/lib/bypasser/criteria.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { StrategiesType } from '../snapshot.ts';
22

3+
/**
4+
* Criteria defines a set of conditions (when) that are used to evaluate the bypasser strategies
5+
*/
36
export default class Criteria {
47
private readonly when: Map<string, string[]>;
58

src/lib/bypasser/key.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Criteria from './criteria.ts';
66
export default class Key {
77
private readonly key: string;
88
private result: boolean;
9-
private reaason?: string;
9+
private reason?: string;
1010
private metadata?: object;
1111
private criteria?: Criteria;
1212

@@ -20,7 +20,7 @@ export default class Key {
2020
*/
2121
true(): this {
2222
this.result = true;
23-
this.reaason = 'Forced to true';
23+
this.reason = 'Forced to true';
2424
return this;
2525
}
2626

@@ -29,7 +29,7 @@ export default class Key {
2929
*/
3030
false(): this {
3131
this.result = false;
32-
this.reaason = 'Forced to false';
32+
this.reason = 'Forced to false';
3333
return this;
3434
}
3535

@@ -57,7 +57,7 @@ export default class Key {
5757
}
5858

5959
/**
60-
* Return current value
60+
* Return key response
6161
*/
6262
getResponse(input?: string[][]): {
6363
result: boolean;
@@ -71,7 +71,7 @@ export default class Key {
7171

7272
return {
7373
result,
74-
reason: this.reaason,
74+
reason: this.reason,
7575
metadata: this.metadata,
7676
};
7777
}
@@ -80,7 +80,7 @@ export default class Key {
8080
for (const [strategyWhen, inputWhen] of criteria.getWhen()) {
8181
const entry = input.filter((e) => e[0] === strategyWhen);
8282
if (entry.length && !inputWhen.includes(entry[0][1])) {
83-
this.reaason = `Forced to ${!this.result} when: [${inputWhen}] - input: ${entry[0][1]}`;
83+
this.reason = `Forced to ${!this.result} when: [${inputWhen}] - input: ${entry[0][1]}`;
8484
return !this.result;
8585
}
8686
}

0 commit comments

Comments
 (0)