MCPcopy Index your code
hub / github.com/simstudioai/sim / sanitizeStorageTitle

Function sanitizeStorageTitle

apps/sim/lib/knowledge/connectors/sync-engine.ts:64–66  ·  view source on GitHub ↗

Sanitizes a document title for use in S3 storage keys.

(title: string)

Source from the content-addressed store, hash-verified

62
63/** Sanitizes a document title for use in S3 storage keys. */
64function sanitizeStorageTitle(title: string): string {
65 return title.replace(/[^a-zA-Z0-9.-]/g, '_').slice(0, MAX_SAFE_TITLE_LENGTH)
66}
67type KnowledgeBaseLockingTx = Pick<typeof db, 'execute' | 'select'>
68
69type DocOp =

Callers 2

addDocumentFunction · 0.85
updateDocumentFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected