Browse Source

docs: document querystring behavior for arrays and unassigned parameters

AJ ONeal 14 years ago
committed by Ben Noordhuis
parent
commit
8039086470
  1. 12
      doc/api/querystring.markdown

12
doc/api/querystring.markdown

@ -10,13 +10,13 @@ Optionally override the default separator and assignment characters.
Example:
querystring.stringify({foo: 'bar'})
querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })
// returns
'foo=bar'
'foo=bar&baz=qux&baz=quux&corge='
querystring.stringify({foo: 'bar', baz: 'bob'}, ';', ':')
querystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':')
// returns
'foo:bar;baz:bob'
'foo:bar;baz:qux'
### querystring.parse(str, sep='&', eq='=')
@ -25,9 +25,9 @@ Optionally override the default separator and assignment characters.
Example:
querystring.parse('a=b&b=c')
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns
{ a: 'b', b: 'c' }
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
### querystring.escape

Loading…
Cancel
Save