diff options
Diffstat (limited to 'src/jsUtils.ts')
-rw-r--r-- | src/jsUtils.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jsUtils.ts b/src/jsUtils.ts index 72e8111e6..0befb8d56 100644 --- a/src/jsUtils.ts +++ b/src/jsUtils.ts | |||
@@ -9,7 +9,11 @@ export const convertToJSON = (data?: string | any | null) => | |||
9 | export const cleanseJSObject = (data?: any | null) => | 9 | export const cleanseJSObject = (data?: any | null) => |
10 | JSON.parse(JSON.stringify(data)); | 10 | JSON.parse(JSON.stringify(data)); |
11 | 11 | ||
12 | export const isEscKeyPress = (key: string) => key === 'Escape'; | 12 | export const isArrowUpKeyPress = (key: string) => key === 'ArrowUp'; |
13 | export const isArrowDownKeyPress = (key: string) => key === 'ArrowDown'; | ||
14 | export const isEnterKeyPress = (key: string) => key === 'Enter'; | ||
15 | export const isEscapeKeyPress = (key: string) => key === 'Escape'; | ||
16 | export const isShiftKeyPress = (key: string) => key === 'Shift'; | ||
13 | 17 | ||
14 | export const safeParseInt = (text?: string | number | null) => { | 18 | export const safeParseInt = (text?: string | number | null) => { |
15 | if (text === undefined || text === null) { | 19 | if (text === undefined || text === null) { |