MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / stableModuloLocal

Function stableModuloLocal

src/server.js:2060–2066  ·  view source on GitHub ↗
(seed, modulo)

Source from the content-addressed store, hash-verified

2058}
2059
2060function stableModuloLocal(seed, modulo) {
2061 let hash = 0;
2062 for (const char of String(seed || "")) {
2063 hash = (hash * 31 + char.codePointAt(0)) >>> 0;
2064 }
2065 return modulo > 0 ? hash % modulo : 0;
2066}
2067
2068async function buildWebLookupContext(event) {
2069 const text = stripMentionText(event.text);

Callers 4

rewriteOverusedQqPhrasesFunction · 0.85
deRepeatQqReplyFunction · 0.85
chooseQqStickerNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected