ljharb/qs

Feature request: option for deciding how to parse query without argument

Open

#223 ouverte le 18 août 2017

Voir sur GitHub
 (6 commentaires) (0 réactions) (0 assignés)JavaScript (744 forks)batch import
feature requesthelp wantedparsestringify

Métriques du dépôt

Stars
 (8 015 stars)
Métriques de merge PR
 (Merge moyen 6j 22h) (2 PRs mergées en 30 j)

Description

Hi,

I was wondering if it would be possible to support passing an option for deciding how to parse queries without arguments? Currently url?foo can be parsed as either the empty string or as null. I am wondering if it's possible to have the parser treat a query without arguments as true.

Some background: I ran into a case in our codebase which does this, it seemed odd to me but apparently there's nothing in the standards that forbid queries without arguments. Are there more specific standards (e.g. the node implementation) that this library is trying to adhere to?

Thanks!

Guide contributeur