@@ -6,7 +6,7 @@ import Criteria from './criteria.ts';
66export 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