Skip to content

Commit

Permalink
Update README.md (#3317)
Browse files Browse the repository at this point in the history
when the string is empty it will return false 

z.coerce.boolean().parse(""); // => false
  • Loading branch information
yugmade13 committed Mar 14, 2024
1 parent cb94d30 commit dca9138
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ z.coerce.boolean().parse(1); // => true
z.coerce.boolean().parse([]); // => true

z.coerce.boolean().parse(0); // => false
z.coerce.boolean().parse(""); // => false
z.coerce.boolean().parse(undefined); // => false
z.coerce.boolean().parse(null); // => false
```
Expand Down

0 comments on commit dca9138

Please sign in to comment.