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

Method #hashScript

tools/common/_hyperscript.iife.js:2735–2741  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

2733 return this.#scriptSelector;
2734 }
2735 #hashScript(str) {
2736 var hash = 5381;
2737 for (var i = 0; i < str.length; i++) {
2738 hash = (hash << 5) + hash + str.charCodeAt(i);
2739 }
2740 return hash;
2741 }
2742 cleanup(elt) {
2743 if (!elt._hyperscript) return;
2744 this.triggerEvent(elt, "hyperscript:before:cleanup");

Callers 1

#initElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected