MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / parseInviteCode

Method parseInviteCode

chat/components/WelcomePanel.js:189–194  ·  view source on GitHub ↗

Normalize and validate a raw invite code string. Returns the cleaned code or null.

(raw)

Source from the content-addressed store, hash-verified

187 }
188
189 /** Normalize and validate a raw invite code string. Returns the cleaned code or null. */
190 parseInviteCode(raw) {
191 const trimmed = (raw || '').trim();
192 if (!trimmed) return null;
193 const code = trimmed.replace(/[\s-]+/g, '');
194 return code.length === 24 ? code : null;
195 }
196
197 isPreviewMode() {

Callers 2

handleInviteSubmitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected