MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / #hashScript

Method #hashScript

www/js/_hyperscript.js:2748–2754  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

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

Callers 1

#initElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected