MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / sanitizeFileSegment

Function sanitizeFileSegment

src/cli.ts:708–710  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

706}
707
708function sanitizeFileSegment(value: unknown) {
709 return String(value).replace(/[^a-zA-Z0-9._-]+/gu, '-').slice(0, 120) || 'weixin-qr';
710}
711
712function truncate(value: string, maxLength: number) {
713 if (value.length <= maxLength) {

Callers 1

materializeQrArtifactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected