-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add project generic filter and generic sort
- Loading branch information
1 parent
58cb535
commit f1332db
Showing
5 changed files
with
87 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
export function isPluralized(name) { | ||
if (name == null || typeof name !== 'string') return false; | ||
return name.endsWith('s'); | ||
} | ||
export function isPluralized(name) { | ||
if (name == null || typeof name !== 'string') return false; | ||
return name.endsWith('s'); | ||
} | ||
|
||
export const genericFilterRegex = /(\w+):(.+):(in|eq|not|lt|gt|lte|gte)/; | ||
export const isArrayRegex = /\[.+\]/; | ||
export const genericSortColumnRegex = /(\w+):(ASC|DESC)/; |
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
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