Gathering detailed insights and metrics for @irmmr/hash.js
Gathering detailed insights and metrics for @irmmr/hash.js
Gathering detailed insights and metrics for @irmmr/hash.js
Gathering detailed insights and metrics for @irmmr/hash.js
A simple and flexible JavaScript library that manages "window.location.hash". With the ability to support queries. (#value?query)
npm install @irmmr/hash.js
Typescript
Module System
Node Version
NPM Version
JavaScript (98.77%)
HTML (1.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
304 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Mar 03, 2025
Latest Version
1.7.8
Package Id
@irmmr/hash.js@1.7.8
Unpacked Size
245.22 kB
Size
50.44 kB
File Count
79
NPM Version
8.5.5
Node Version
16.15.0
Published on
Mar 16, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
It is better to use version 1.7.0 and above. Lower versions are not recommended at all.
Hash.js is a simple and flexible javascript library that manages the location.hash
page. To change
, add
, set
, check
, get
the hash value or query you can use this library. The page hash is a combination of 2 parts, "value" and "query". This value is set as follows: #value?query
.
You can install this package with npm
and use it.
npm install @irmmr/hash.js
Or use the built-in version of this library separately.
1<script src="path/to/dist/hash.min.js"></script>
You can also use with: jsdelivr
:
1<script src="https://cdn.jsdelivr.net/npm/@irmmr/hash.js"></script>
The document contains all the components included in the package.
You can test this library in the browser online. view ->
Otherwise, you must use the following commands to test the items:
1# install test packages 2npm run start 3 4# test last published version 5npm test 6 7# test last changed file 8npm test -- --dev
The components of this library are divided into 3 main sections, which include main, value and query. query itself includes the (str)string section so that query items can be implemented as a string.
1import Hash from "@irmmr/hash.js"; 2 3// use Hash.js information 4// Object { version: "1.7.5", name: "HashJs", module: "Hash" } 5Hash.info(); 6 7// use Hash.js event 8Hash.on(listener, (e, i) => { 9 //... 10});
Main: Items for general hash management. value?query
1// set example 2// => #string-for-me 3Hash.set("string-for-me"); 4 5// replace example 6// => #stringforme 7Hash.replace(/-/g, "");
Value: Items for value hash management. value
?query
1// Hash.v == Hash.value 2// set example 3Hash.v.set("new-value"); 4 5// get example 6console.log(Hash.value.get());
Query: Items for query hash management. value?query
(objective)
1// Hash.q == Hash.query 2// set example 3Hash.q.set("query-name", "query-val"); 4 5// get example 6console.log(Hash.query.get("query-name"));
Query str: Items for query hash management as string. value?query
(string)
1// add example 2Hash.q.str.add("q=v", "after:g"); 3 4// get example 5console.log(Hash.q.str.get());
These include a few simple examples.
1// set a value to location.hash (main component) 2Hash.set("hello-babe"); // page's hash => '#hello-babe' 3 4// get location.hash (main component) 5Hash.get(); // returns => 'hello-babe' 6 7// set new value (value component) 8Hash.v.set("hey-value"); // page's hash => '#hey-value' 9 10// set 'page' query (query component) 11Hash.q.set("page", 1); // page's hash => '#hey-value?page=1' 12 13// set 'e' query (query string component) 14Hash.q.str.set("ev=12"); // page's hash => '#hey-value?ev=12'
ready() one-line usage
1// #data-type?name=J 2Hash.ready()?.set("data-type").q.set("name", "J");
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More