From 836beda4229d99c665bb467edb2c4b6dc839e667 Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 24 Apr 2025 20:45:34 -0700 Subject: [PATCH] Quick helper module --- api/src/common.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 api/src/common.ts diff --git a/api/src/common.ts b/api/src/common.ts new file mode 100644 index 0000000..7b12e27 --- /dev/null +++ b/api/src/common.ts @@ -0,0 +1,6 @@ +export function values_present(values: any[]) : boolean { + /** + * Function determines if there are any undefined or null values present + */ + return values.filter((val) => val === undefined || val === null).length > 0 +}