aboutsummaryrefslogtreecommitdiffstats
path: root/src/jsUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsUtils.ts')
-rw-r--r--src/jsUtils.ts6
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) =>
9export const cleanseJSObject = (data?: any | null) => 9export const cleanseJSObject = (data?: any | null) =>
10 JSON.parse(JSON.stringify(data)); 10 JSON.parse(JSON.stringify(data));
11 11
12export const isEscKeyPress = (key: string) => key === 'Escape'; 12export const isArrowUpKeyPress = (key: string) => key === 'ArrowUp';
13export const isArrowDownKeyPress = (key: string) => key === 'ArrowDown';
14export const isEnterKeyPress = (key: string) => key === 'Enter';
15export const isEscapeKeyPress = (key: string) => key === 'Escape';
16export const isShiftKeyPress = (key: string) => key === 'Shift';
13 17
14export const safeParseInt = (text?: string | number | null) => { 18export const safeParseInt = (text?: string | number | null) => {
15 if (text === undefined || text === null) { 19 if (text === undefined || text === null) {