Very simple CommonJS-module to encode/decode query parameters
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
index.js
karma.conf.js
package.json
query-params.test.js

README.md

query-params

Very simple CommonJS-module to encode/decode query parameters

Build Status NPM

Convert object to query string or opposite. You need Browserify or similar to use this in a browser. It doesn't use ES5, so it should work in older browsers.

Installation

npm install query-params --save

Example usage

var params = require('query-params');

params.encode({'foo': 'bar', 'a': 'b'}); // 'foo=bar&a=b'

params.decode('foo=bar&a=b'); // {'foo': 'bar', 'a': 'b'}