Skip to content

Commit 20828a6

Browse files
committed
fix: extend the judgment logic of isBooleanStringLiteral
1 parent 6964768 commit 20828a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/is.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function isNumber (o: unknown): o is number {
2828
}
2929

3030
export function isBooleanStringLiteral (o: unknown): o is string {
31-
return o === 'true' || o === 'false'
31+
return o === 'true' || o === 'false' || o === '!0' || o === '!1'
3232
}
3333

3434
export function isObjectStringLiteral (o: unknown): o is string {

0 commit comments

Comments
 (0)