jquery-param-fn

1.0.3 • Public • Published

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

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i jquery-param-fn

    Weekly Downloads

    53

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • amaranhao