Skip to content

FEAT: implement support for boolean type #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scottenock
Copy link
Contributor

@scottenock scottenock commented May 8, 2025

Hey @sindresorhus , when implementing the parsing fix for PR #406 I noticed it would be pretty quick to add support for a boolean type. This allows the user to override the behaviour of parseBoolean.

I've updated the README and type definitions to include the new boolean type.

I've also updated the description of the types feature to be clearer. Let me know your thoughts!

@sindresorhus
Copy link
Owner

Thanks for implementing this. I think it should also accept 0 and 1 as those are commonly used as booleans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants