{ "source": "doc/api/querystring.markdown", "modules": [ { "textRaw": "Query String", "name": "querystring", "stability": 3, "stabilityText": "Stable", "desc": "
This module provides utilities for dealing with query strings.\nIt provides the following methods:\n\n
\n", "methods": [ { "textRaw": "querystring.stringify(obj, [sep], [eq])", "type": "method", "name": "stringify", "desc": "Serialize an object to a query string.\nOptionally override the default separator ('&'
) and assignment ('='
)\ncharacters.\n\n
Example:\n\n
\nquerystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })\n// returns\n'foo=bar&baz=qux&baz=quux&corge='\n\nquerystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':')\n// returns\n'foo:bar;baz:qux'
\n",
"signatures": [
{
"params": [
{
"name": "obj"
},
{
"name": "sep",
"optional": true
},
{
"name": "eq",
"optional": true
}
]
}
]
},
{
"textRaw": "querystring.parse(str, [sep], [eq], [options])",
"type": "method",
"name": "parse",
"desc": "Deserialize a query string to an object.\nOptionally override the default separator ('&'
) and assignment ('='
)\ncharacters.\n\n
Options object may contain maxKeys
property (equal to 1000 by default), it'll\nbe used to limit processed keys. Set it to 0 to remove key count limitation.\n\n
Example:\n\n
\nquerystring.parse('foo=bar&baz=qux&baz=quux&corge')\n// returns\n{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
\n",
"signatures": [
{
"params": [
{
"name": "str"
},
{
"name": "sep",
"optional": true
},
{
"name": "eq",
"optional": true
},
{
"name": "options",
"optional": true
}
]
}
]
}
],
"properties": [
{
"textRaw": "querystring.escape",
"name": "escape",
"desc": "The escape function used by querystring.stringify
,\nprovided so that it could be overridden if necessary.\n\n
The unescape function used by querystring.parse
,\nprovided so that it could be overridden if necessary.\n