{"id":23910957,"url":"https://github.com/crpietschmann/jhash","last_synced_at":"2025-04-11T12:37:46.667Z","repository":{"id":141723950,"uuid":"102062193","full_name":"crpietschmann/jHash","owner":"crpietschmann","description":"jHash allows you to work with 'location.hash' value in a similar fashion to a server-side query string. It also supports cross-browser \"hashchange\" event handling and a hash-based Routing engine.","archived":false,"fork":false,"pushed_at":"2023-08-15T22:41:59.000Z","size":1604,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T18:16:23.235Z","etag":null,"topics":["hash","jquery","querystring","router"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crpietschmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://paypal.me/simplovation"}},"created_at":"2017-09-01T01:49:30.000Z","updated_at":"2023-08-15T22:43:05.000Z","dependencies_parsed_at":"2023-08-19T06:35:06.129Z","dependency_job_id":null,"html_url":"https://github.com/crpietschmann/jHash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crpietschmann%2FjHash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crpietschmann%2FjHash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crpietschmann%2FjHash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crpietschmann%2FjHash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crpietschmann","download_url":"https://codeload.github.com/crpietschmann/jHash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085322,"owners_count":21045139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hash","jquery","querystring","router"],"created_at":"2025-01-05T07:36:08.847Z","updated_at":"2025-04-11T12:37:46.642Z","avatar_url":"https://github.com/crpietschmann.png","language":"JavaScript","funding_links":["https://paypal.me/simplovation"],"categories":[],"sub_categories":[],"readme":"# jHash - \"location.hash\" -based Routes and Querystrings\njHash allows you to work with 'location.hash' value in a similar fashion to a server-side query string. It also supports cross-browser \"hashchange\" event handling and a hash-based Routing engine.\n\nThis library utilizes the HTML5 \"onhashchange\" event, but also includes a fall back to still allow the change notifications to work properly in older web browsers.\n\n[View Documentation Here](https://github.com/crpietschmann/jHash/wiki)\n\n## Key Advantages of jHash\n\n- Free, open source (MIT icense)\n- Simple and Lightweight - 4kb minified / 2kb compressed\n- Supports all mainstream browsers - IE7+, Firefox, Safari, Chrome\n- Fully Documented\n- No Dependencies\n- Single Page Application support via Hash Routing\n- Hash QueryString Support for easily storing key/value pairs in hash\n- Far easier than accessing and parsing \"location.hash\" manually\n\n## NuGet Package\n\n[http://nuget.org/packages/jhash](http://nuget.org/packages/jhash)\n\n![](images/NuGet-Package.png)\n\n## Sample Code\n\n```\n// *********************************************\n// jHash Routing Example:\n// *********************************************\n// Hash that would match this Route Pattern\n// #Wisconsin/Milwaukee\njHash.route('{state}/{city}',\n    function () {\n        var stateName = this.state;\n        // stateName will equal 'Wisconsin'\n\n        var cityName = this.city;\n        // cityName will equal 'Milwaukee'\n    }\n);\n\n// *********************************************\n// \"location.hash\" Manipulation Examples:\n// *********************************************\n// URL:\n// http://localhost/page.htm#SomeValue?name=Chris\u0026location=Wisconsin\n\n// get \"root\" hash value\nvar root = jHash.root(); // returns \"SomeValue\"\n\n// get \"name\" hash querystring value\nvar name = jHash.val('name'); // returns \"Chris\"\n\n// get \"location\" hash querystring value\nvar loc = jHash.val('location'); // return \"Wisconsin\"\n\n// set new individual query string value\njHash.val('name', 'Steve');\n\n// set all new query string hash values\njHash.val({\n    name: 'Steve',\n    location: 'Montana'\n});\n\n// clear the hash\njHash.clear();\n\n// clear just the hash root value\njHash.clearRoot();\n\n// clear just the hash querystring\njHash.clearQuery();\n```\n\n## Articles / News\n\n2012-05-01 - [jHash v2.0 Released: Now with Routing Support!](http://pietschsoft.com/post/2012/05/01/jHash-v20-Released-Now-with-Routing-Support!.aspx)\n\n2010-11-26 - [jHash: Easily Manage Browser History / window.location.hash](http://pietschsoft.com/post/2010/11/26/jHash-Easily-Manage-Browser-History-windowlocationhash.aspx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrpietschmann%2Fjhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrpietschmann%2Fjhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrpietschmann%2Fjhash/lists"}