Skip to content

Antonio-Maranhao/jquery-param-fn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No dependencies alternative to jQuery.param()

Resources

License

Stars

Watchers

Forks

Packages

No packages published