Skip to content

Commit

Permalink
add true and false to primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrekim committed Feb 3, 2025
1 parent f314282 commit f7cff43
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,15 @@ function isString(str: string) {
}

function isPrimitive(type: string) {
return ['boolean', 'number', 'bigint', 'string', 'symbol'].includes(
typeWithoutArray(type),
)
return [
'boolean',
'true',
'false',
'number',
'bigint',
'string',
'symbol',
].includes(typeWithoutArray(type))
}

function typeWithoutArray(type: string) {
Expand Down

0 comments on commit f7cff43

Please sign in to comment.