diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-10-03 18:04:19 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-10-03 18:04:19 +0200 |
| commit | 3352727aa638fcfcc6461d2aaded8ef9603acc0d (patch) | |
| tree | 880b381af0c1e717803c6fa233cc8792193d84dd /apps/kit/src/lib/helpers.ts | |
| parent | c5af87a9312affc84ee9dbc654f8a4942f0d1e1c (diff) | |
| download | greatoffice-3352727aa638fcfcc6461d2aaded8ef9603acc0d.tar.xz greatoffice-3352727aa638fcfcc6461d2aaded8ef9603acc0d.zip | |
feat: Initial setup facilitating testing
Diffstat (limited to 'apps/kit/src/lib/helpers.ts')
| -rw-r--r-- | apps/kit/src/lib/helpers.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/kit/src/lib/helpers.ts b/apps/kit/src/lib/helpers.ts index 6f52dc6..38376e5 100644 --- a/apps/kit/src/lib/helpers.ts +++ b/apps/kit/src/lib/helpers.ts @@ -20,6 +20,10 @@ export function get_default_sorted(unsorted: Array<TimeEntryDto>): Array<TimeEnt }); } +export function get_element_by_pw_key(key: string): HTMLElement | null { + return document.querySelector("[pw-key='" + key + "']"); +} + export function is_email(value: string): boolean { return EMAIL_REGEX.test(String(value).toLowerCase()); } |
