This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 0 21 1 * sh ~/command.sh | |
0 0 21 2 * sh ~/command.sh | |
0 0 22 3 * sh ~/command.sh | |
0 0 22 4 * sh ~/command.sh | |
0 0 23 5 * sh ~/command.sh | |
0 0 23 6 * sh ~/command.sh | |
0 0 23 7 * sh ~/command.sh | |
0 0 23 8 * sh ~/command.sh | |
0 0 22 9 * sh ~/command.sh | |
0 0 22 10 * sh ~/command.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GridifyConditionEnum, GridifyLogicalEnum, GridifyOrderEnum, FilterType, OperatorType, FiltersType } from "./types.ts"; | |
function trimEnds(query: string): string { | |
let result = query; | |
// There should not be any starting or ending operator | |
if (result.startsWith(GridifyLogicalEnum.And)) result = result.slice(GridifyLogicalEnum.And.length); | |
if (result.startsWith(GridifyLogicalEnum.Or)) result = result.slice(GridifyLogicalEnum.Or.length); | |
if (result.endsWith(GridifyLogicalEnum.And)) result = result.slice(0, -GridifyLogicalEnum.And.length); | |
if (result.endsWith(GridifyLogicalEnum.Or)) result = result.slice(0, -GridifyLogicalEnum.Or.length); | |
return result; |