about summary refs log tree commit diff
path: root/src/state/lib/type-guards.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-07 15:35:51 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-07 15:35:51 -0600
commitd228a5f4f5d118f30129f3bafd676bfe0e80bf38 (patch)
treee292e9d3b1f7a027298308ef583a7d3b90b59157 /src/state/lib/type-guards.ts
parentb4097e25d67739c0ab6bc5b5f6ce8ee062796458 (diff)
downloadvoidsky-d228a5f4f5d118f30129f3bafd676bfe0e80bf38.tar.zst
Add onboarding (WIP)
Diffstat (limited to 'src/state/lib/type-guards.ts')
-rw-r--r--src/state/lib/type-guards.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/lib/type-guards.ts b/src/state/lib/type-guards.ts
index 4ae31f3ac..8fe651ffb 100644
--- a/src/state/lib/type-guards.ts
+++ b/src/state/lib/type-guards.ts
@@ -8,3 +8,7 @@ export function hasProp<K extends PropertyKey>(
 ): data is Record<K, unknown> {
   return prop in data
 }
+
+export function isStrArray(v: unknown): v is string[] {
+  return Array.isArray(v) && v.every(item => typeof item === 'string')
+}