MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / #hashScript

Method #hashScript

www/js/_hyperscript.esm.js:2746–2752  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

2744 return this.#scriptSelector;
2745 }
2746 #hashScript(str) {
2747 var hash = 5381;
2748 for (var i = 0; i < str.length; i++) {
2749 hash = (hash << 5) + hash + str.charCodeAt(i);
2750 }
2751 return hash;
2752 }
2753 cleanup(elt) {
2754 if (!elt._hyperscript) return;
2755 this.triggerEvent(elt, "hyperscript:before:cleanup");

Callers 1

#initElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected