FANDOM



Query StringEdit

This module provides utilities for dealing with query strings. It provides the following methods:

querystring.stringify(obj, sep='&', eq='=')Edit

Serialize an object to a query string. Optionally override the default separator and assignment characters.

Example:

querystring.stringify({foo: 'bar'})
// returns
'foo=bar'

querystring.stringify({foo: 'bar', baz: 'bob'}, ';', ':')
// returns
'foo:bar;baz:bob'

querystring.parse(str, sep='&', eq='=')Edit

Deserialize a query string to an object. Optionally override the default separator and assignment characters.

Example:

querystring.parse('a=b&b=c')
// returns
{ a: 'b', b: 'c' }

querystring.escapeEdit

The escape function used by querystring.stringify, provided so that it could be overridden if necessary.

querystring.unescapeEdit

The unescape function used by querystring.parse, provided so that it could be overridden if necessary.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.