No dependencies alternative to the jQuery.param()
function.
Creates a URL query string from an object or array.
$ npm install jquery-param-fn --save
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) {
...
});
$ npm test
to check test coverage:
$ npm run test-coverage
MIT