doc: sort querystring alphabetically

Reorders, with no contextual changes, the querystring documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
Tristian Flanagan 2015-11-04 12:26:30 -05:00 committed by James M Snell
parent 69cbaf691e
commit ed1f10de95

View File

@ -7,6 +7,36 @@
This module provides utilities for dealing with query strings.
It provides the following methods:
## querystring.escape
The escape function used by `querystring.stringify`,
provided so that it could be overridden if necessary.
## querystring.parse(str[, sep][, eq][, options])
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.
Options object may contain `decodeURIComponent` property (`querystring.unescape` by default),
it can be used to decode a `non-utf8` encoding string if necessary.
Example:
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
// Suppose gbkDecodeURIComponent function already exists,
// it can decode `gbk` encoding string
querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null,
{ decodeURIComponent: gbkDecodeURIComponent })
// returns
{ w: '中文', foo: 'bar' }
## querystring.stringify(obj[, sep][, eq][, options])
Serialize an object to a query string.
@ -33,36 +63,6 @@ Example:
// returns
'w=%D6%D0%CE%C4&foo=bar'
## querystring.parse(str[, sep][, eq][, options])
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.
Options object may contain `decodeURIComponent` property (`querystring.unescape` by default),
it can be used to decode a `non-utf8` encoding string if necessary.
Example:
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
// Suppose gbkDecodeURIComponent function already exists,
// it can decode `gbk` encoding string
querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null,
{ decodeURIComponent: gbkDecodeURIComponent })
// returns
{ w: '中文', foo: 'bar' }
## querystring.escape
The escape function used by `querystring.stringify`,
provided so that it could be overridden if necessary.
## querystring.unescape
The unescape function used by `querystring.parse`,