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

Method #hashScript

www/js/_hyperscript-max.js:2747–2753  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

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

Callers 1

#initElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected