Package Exports
- jquery-param
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jquery-param) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jquery-param 
Features
- equivalent to jQuery.param
- no jQuery necessary
- no dependencies
- legacy IE support
What is this good for?
When making a GET/POST request in Web Workers etc., which cannot use jQuery. Especially when sending Array as a parameter.
Install
Node.js:
$ npm install jquery-param --save
Bower:
$ bower install jquery-param
browser:
<script src="./src/jquery-param.min.js"></script>
Usage
Node.js:
var param = require('jquery-param');
var obj = { key1: 'value1', key2: [10, 20, 30] };
var str = param(obj);
// => "key1=value1&key2[]=10&key2[]=20&key2[]=30"
browser:
var obj = { key1: { value1: [10, 20, 30] }, key2: '?a=b&c=d' };
var str = window.param(obj);
// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"
Browser Support
Chrome, Firefox, Safari, Opera, and Internet Explorer 6+.
License
MIT