Skip to content

Commit 4527138

Browse files
author
Vincent Molinié
committed
chore: remove unused function which drops coverage
1 parent 9d12de2 commit 4527138

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

src/services/filters-parser.js

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -59,61 +59,6 @@ function FiltersParser(modelSchema, timezone, options) {
5959
}
6060
};
6161

62-
this.formatOperator = (operator) => {
63-
switch (operator) {
64-
case 'not':
65-
return this.OPERATORS.NOT;
66-
case 'greater_than':
67-
case 'after':
68-
return this.OPERATORS.GT;
69-
case 'less_than':
70-
case 'before':
71-
return this.OPERATORS.LT;
72-
case 'contains':
73-
case 'starts_with':
74-
case 'ends_with':
75-
return this.OPERATORS.LIKE;
76-
case 'not_contains':
77-
return this.OPERATORS.NOT_LIKE;
78-
case 'present':
79-
case 'not_equal':
80-
return this.OPERATORS.NE;
81-
case 'blank':
82-
case 'equal':
83-
return this.OPERATORS.EQ;
84-
case 'includes_all':
85-
return this.OPERATORS.CONTAINS;
86-
default:
87-
throw new NoMatchingOperatorError();
88-
}
89-
};
90-
91-
this.formatValue = (operator, value) => {
92-
switch (operator) {
93-
case 'not':
94-
case 'greater_than':
95-
case 'less_than':
96-
case 'not_equal':
97-
case 'equal':
98-
case 'before':
99-
case 'after':
100-
case 'includes_all':
101-
return value;
102-
case 'contains':
103-
case 'not_contains':
104-
return `%${value}%`;
105-
case 'starts_with':
106-
return `${value}%`;
107-
case 'ends_with':
108-
return `%${value}`;
109-
case 'present':
110-
case 'blank':
111-
return null;
112-
default:
113-
throw new NoMatchingOperatorError();
114-
}
115-
};
116-
11762
this.formatOperatorValue = (operator, value, isTextField = false) => {
11863
switch (operator) {
11964
case 'not':

0 commit comments

Comments
 (0)