Methods
parse(obj, sepopt, eqopt, optionsopt)
inner
Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters.
Options object may contain maxKeys property (equal to 1000 by default), it'll be used to limit processed keys. Set it to 0 to remove key count limitation.
Example:
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
Arguments:
-
obj (Object)
-
[sep="&"] (String)
-
[eq="="] (String)
-
[options] (Object)
Properties
-
[maxKeys=1000] (Number)
Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters.
Options object may contain maxKeys property (equal to 1000 by default), it'll be used to limit processed keys. Set it to 0 to remove key count limitation.
Example:
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
obj (Object)
[sep="&"] (String)
[eq="="] (String)
[options] (Object)
Properties
-
[maxKeys=1000](Number)