Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs: document querystring behavior for arrays and unassigned parameters

  • Loading branch information...
commit 80390864700567084b383c2cf026d8de64f589aa 1 parent fe4b742
AJ ONeal coolaj86 authored bnoordhuis committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 doc/api/querystring.markdown
12 doc/api/querystring.markdown
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.