get-parameter

1.0.8 • Public • Published

Get Parameter npm version Build Status

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT © Ryan Burgess

Package Sidebar

Install

npm i get-parameter

Weekly Downloads

156

Version

1.0.8

License

MIT

Last publish

Collaborators

  • ryanburgess