jquery-param-fn
v1.0.3
Published
Alternative to JQuery's param function.
Downloads
207
Readme
jquery-param-fn
No dependencies alternative to the jQuery.param()
function.
Creates a URL query string from an object or array.
Install
$ npm install jquery-param-fn --save
Usage
const param = require('jquery-param-fn');
const formData = { name: 'John Doe', age: 38 };
const queryString = param(formData); // name=John%20Doe&age=38
fetch('http://example.com?' + queryString).then(function(res) {
...
});
Test
$ npm test
to check test coverage:
$ npm run test-coverage
License
MIT