get-parameter
v1.0.8
Published
Get Parameter is a simple JavaScript module that returns query string values in JavaScript.
Downloads
1,020
Maintainers
Readme
Get Parameter
Get Parameter is a simple JavaScript module that returns query string values in JavaScript.
Install
npm install get-parameter --save-dev
Use
var getParameter = require('get-parameter');
var productId = getParameter('id');
console.log(productId);
// return all get queries
var getParams = getParameter();
// result example:
/* {
"id":"2",
"redirect":"true"
} */
Release History
- 1.0.8: Merge Issue #4
- 1.0.7: Add support for IE8 and below. Issue #3
- 1.0.6: Add tests.
- 1.0.5: Add 'use strict' and gitignore.
- 1.0.4: Add gruntfile.
- 1.0.3: Return all get queries.
- 1.0.2: Move repo.
- 1.0.1: Small update.
- 1.0.0: Initial release.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
MIT © Ryan Burgess