Skip to content

parseAsBoolean parses TRUE as false #1203

@joshuaobrien

Description

@joshuaobrien

Context

What's your version of nuqs?

2.7.2

What framework are you using?

  • ✅ Next.js (app router)

Which version of your framework are you using?

15.4.3

Description

My application interacts with existing systems that use 'TRUE' rather than 'true' for booleans in search params. I was a little surprised to find that nuqs parses 'TRUE' as false.

Reproduction

parseAsBoolean.parse('true')  // returns true
parseAsBoolean.parse('TRUE')  // returns false 

Proposed fix

See draft PR #1204

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions