diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-07 15:35:51 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-07 15:35:51 -0600 |
commit | d228a5f4f5d118f30129f3bafd676bfe0e80bf38 (patch) | |
tree | e292e9d3b1f7a027298308ef583a7d3b90b59157 /src/state/lib/type-guards.ts | |
parent | b4097e25d67739c0ab6bc5b5f6ce8ee062796458 (diff) | |
download | voidsky-d228a5f4f5d118f30129f3bafd676bfe0e80bf38.tar.zst |
Add onboarding (WIP)
Diffstat (limited to 'src/state/lib/type-guards.ts')
-rw-r--r-- | src/state/lib/type-guards.ts | 4 |
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') +} |