A Small JavaScript Library For Getting and Assigning Hash Parameters

Hash Parser is a small JavaScript library to get (encoded) query parameters and set them in the URL hash.

The hash parser is a very small JavaScript library that helps you manipulate (set/get) query parameters in the URL.

Read Also – JavaScript Library to Generate YouTube-Like ids From Numbers | Hashids

How to make use of it:

1. Include the hashparser’s JavaScript on the web page.

<script src="dist/hashparser.min.js"></script>

2. Append question parameters to the present URL.

HashParser.setParameter('web', 'codeflow');
=> https://youtsite.com/page.html#!css=script

3. Determine whether or not to encode the query parameter value.

HashParser.setParameter(‘web’, ‘codeflow’, true);
=> https://youtsite.com/page.html#!css=InNjcmlwdCI=

4. It helps any sort of information within the hash.

var example = {
    "css": "script"
HashParser.setParameter('example', greeting, true);

5. Get the encoded value of a query parameter.

var getPara = HashParser.getParameter('web', true);

Make sure you have included dist/hashparser.js somewhere in your code.

HashParser.setParameter(key, value, encode)

Set & Get Query Parameters, Hash Parser Plugin/Github

See Demo And Download

Official Website(rvanbaalen): Click Here

This superior jQuery/javascript plugin is developed by rvanbaalen. For extra Advanced Usage, please go to the official website.