Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeart committed Jan 18, 2025
1 parent 855c2e7 commit 4725130
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/utils/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ export function isEmpty(value: unknown): value is null | undefined {
}

export function isPrimitive(value: unknown): value is string | number {
switch (typeof value) {
case 'string':
case 'number':
case 'boolean':
case 'bigint':
return true;
default:
return false;
}
const vType = typeof value;
return (
vType === 'string' ||
vType === 'number' ||
vType === 'boolean' ||
vType === 'bigint'
);
}

export function isTagLike(child: unknown): child is AnyCell {
Expand Down

0 comments on commit 4725130

Please sign in to comment.