From 97fa3acb1a65a9968ad4ccd997b8f90d72d72793 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Sun, 16 Jul 2023 14:25:35 -0600 Subject: [PATCH] feat: added basic string checker --- backend/UserConfig.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/UserConfig.ts b/backend/UserConfig.ts index fecf4ec..7b819c2 100644 --- a/backend/UserConfig.ts +++ b/backend/UserConfig.ts @@ -11,6 +11,11 @@ const numChecker = (val: any) => { catch (err) { return false; } } +/** + * Returns a boolean if the provided value is a non-empty string + */ +const basicStringChecker = (val: any) => typeof val === 'string' && val.length > 0; + /** * User-config property type checker functions */