Skip to content

Commit 07ed46e

Browse files
Polishing
1 parent b9be65c commit 07ed46e

File tree

15 files changed

+18
-19
lines changed

15 files changed

+18
-19
lines changed

src/__tests__/testUtils/csv.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ import fs from 'fs';
22
import rl from 'readline';
33

44
export function readCSV(filePath: string, delimiter = ','): Promise<string[][]> {
5-
const parser = rl.createInterface({
6-
terminal: false,
7-
input: fs.createReadStream(filePath)
8-
});
9-
105
return new Promise((resolve) => {
6+
const parser = rl.createInterface({
7+
input: fs.createReadStream(filePath)
8+
});
9+
1110
const data: string[][] = [];
1211

1312
parser

src/evaluator/matchers/between.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IBetweenMatcherData } from '../../dtos/types';
22
import { ENGINE_MATCHER_BETWEEN } from '../../logger/constants';
33
import { ILogger } from '../../logger/types';
44

5-
export function betweenMatcherContext(log: ILogger, ruleVO: IBetweenMatcherData) /*: Function */ {
5+
export function betweenMatcherContext(log: ILogger, ruleVO: IBetweenMatcherData) {
66
return function betweenMatcher(runtimeAttr: number): boolean {
77

88
let isBetween = runtimeAttr >= ruleVO.start && runtimeAttr <= ruleVO.end;

src/evaluator/matchers/boolean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ENGINE_MATCHER_BOOLEAN } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33

4-
export function booleanMatcherContext(log: ILogger, ruleAttr: boolean) /*: Function */ {
4+
export function booleanMatcherContext(log: ILogger, ruleAttr: boolean) {
55
return function booleanMatcher(runtimeAttr: boolean): boolean {
66
let booleanMatches = ruleAttr === runtimeAttr;
77

src/evaluator/matchers/cont_all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ENGINE_MATCHER_CONTAINS_ALL } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33
import { findIndex } from '../../utils/lang';
44

5-
export function containsAllSetMatcherContext(log: ILogger, ruleAttr: string[]) /*: Function */ {
5+
export function containsAllSetMatcherContext(log: ILogger, ruleAttr: string[]) {
66
return function containsAllMatcher(runtimeAttr: string[]): boolean {
77
let containsAll = true;
88

src/evaluator/matchers/cont_any.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ENGINE_MATCHER_CONTAINS_ANY } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33
import { findIndex } from '../../utils/lang';
44

5-
export function containsAnySetMatcherContext(log: ILogger, ruleAttr: string[]) /*: Function */ {
5+
export function containsAnySetMatcherContext(log: ILogger, ruleAttr: string[]) {
66
return function containsAnyMatcher(runtimeAttr: string[]): boolean {
77
let containsAny = false;
88

src/evaluator/matchers/cont_str.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isString } from '../../utils/lang';
22
import { ILogger } from '../../logger/types';
33
import { ENGINE_MATCHER_CONTAINS_STRING } from '../../logger/constants';
44

5-
export function containsStringMatcherContext(log: ILogger, ruleAttr: string[]) /*: Function */ {
5+
export function containsStringMatcherContext(log: ILogger, ruleAttr: string[]) {
66
return function containsStringMatcher(runtimeAttr: string): boolean {
77
let contains = ruleAttr.some(e => isString(runtimeAttr) && runtimeAttr.indexOf(e) > -1);
88

src/evaluator/matchers/eq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ENGINE_MATCHER_EQUAL } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33

4-
export function equalToMatcherContext(log: ILogger, ruleAttr: number) /*: Function */ {
4+
export function equalToMatcherContext(log: ILogger, ruleAttr: number) {
55
return function equalToMatcher(runtimeAttr: number): boolean {
66
let isEqual = runtimeAttr === ruleAttr;
77

src/evaluator/matchers/eq_set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ENGINE_MATCHER_EQUAL_TO_SET } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33
import { findIndex } from '../../utils/lang';
44

5-
export function equalToSetMatcherContext(log: ILogger, ruleAttr: string[]) /*: Function */ {
5+
export function equalToSetMatcherContext(log: ILogger, ruleAttr: string[]) {
66
return function equalToSetMatcher(runtimeAttr: string[]): boolean {
77
// Length being the same is the first condition.
88
let isEqual = runtimeAttr.length === ruleAttr.length;

src/evaluator/matchers/ew.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ENGINE_MATCHER_ENDS_WITH } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33
import { endsWith } from '../../utils/lang';
44

5-
export function endsWithMatcherContext(log: ILogger, ruleAttr: string[]) /*: Function */ {
5+
export function endsWithMatcherContext(log: ILogger, ruleAttr: string[]) {
66
return function endsWithMatcher(runtimeAttr: string): boolean {
77
let strEndsWith = ruleAttr.some(e => endsWith(runtimeAttr, e));
88

src/evaluator/matchers/gte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ENGINE_MATCHER_GREATER } from '../../logger/constants';
22
import { ILogger } from '../../logger/types';
33

4-
export function greaterThanEqualMatcherContext(log: ILogger, ruleAttr: number) /*: Function */ {
4+
export function greaterThanEqualMatcherContext(log: ILogger, ruleAttr: number) {
55
return function greaterThanEqualMatcher(runtimeAttr: number): boolean {
66
let isGreaterThanEqual = runtimeAttr >= ruleAttr;
77

0 commit comments

Comments
 (0)