

- Equivalent to jQuery.param (based on jQuery 3.x)
- No dependencies
- Universal (Isomorphic)
- ES Modules Support
via npm:
importparamfrom'jquery-param';constobj={key1:{value1:[10,20,30]},key2:'?a=b&c=d'};conststr=param(obj);// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"CommonJS:
constparam=require('jquery-param');constobj={key1:{value1:[10,20,30]},key2:'?a=b&c=d'};conststr=param(obj);// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"ES Modules (Browser):
<scripttype="module">importparamfrom'/path/to/jquery-param.js';constobj={key1:{value1:[10,20,30]},key2:'?a=b&c=d'};conststr=param(obj);// => "key1[value1][]=10&key1[value1][]=20&key1[value1][]=30&key2=?a=b&c=d"</script>Traditional (Browser):
<scriptsrc="/path/to/jquery-param.js"><script>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"</script>Chrome, Firefox, Safari, Edge, and IE9+.
MIT