Module: qs-lite

qs-lite.js - Lightweight querystring parse() & stringify() at less than 1KB minified
License:
  • BSD
Source:
See:

Methods

(inner) parse(string) → {Object}

Parse string as application/x-www-form-urlencoded representation.
Parameters:
Name Type Description
string String application/x-www-form-urlencoded representation
Source:
Returns:
plain key-value pair object
Type
Object
Example
var qs = require("qs-lite");

var obj = qs.parse("foo=bar&hoge=pomu"); // => { "foo": "bar", "hoge": "pomu" }

(inner) stringify(obj) → {string}

Stringify object as application/x-www-form-urlencoded representation.
Parameters:
Name Type Description
obj Object plain key-value pair object
Source:
Returns:
application/x-www-form-urlencoded representation.
Type
string
Example
var qs = require("qs-lite");

var string = qs.stringify({foo: "bar", hoge: "pomu"}); // => "foo=bar&hoge=pomu"