hash.js
hash.js is a super tiny framework to handle your location.hash
Get
/* * Given the following url: http://www.example.net/#!&foo=bar&array[]=1&array[]=2 */ ; // 'bar'; // ['1', '2']; // { foo: 'bar', array: ['1', '2'] }
Set
// Results in http://www.example.net/#!&foo=bar; // Results in http://www.example.net/#!&foo[]=bar&foo[]=baz; // Results in http://www.example.net/#!;
Testing
Tests are written using jasmine
and can be executed in the browser, by browsing test/index.html
.
This project is too tiny for continuous integration imo.