MCPcopy
hub / github.com/simstudioai/sim / stripStorageKeyPrefix

Function stripStorageKeyPrefix

apps/sim/app/api/files/serve/[...path]/route.ts:53–55  ·  view source on GitHub ↗
(segment: string)

Source from the content-addressed store, hash-verified

51const STORAGE_KEY_PREFIX_RE = /^\d{13}-[a-z0-9]{7}-/
52
53function stripStorageKeyPrefix(segment: string): string {
54 return STORAGE_KEY_PREFIX_RE.test(segment) ? segment.replace(STORAGE_KEY_PREFIX_RE, '') : segment
55}
56
57function getWorkspaceIdForCompile(key: string): string | undefined {
58 return parseWorkspaceFileKey(key) ?? undefined

Callers 2

handleLocalFileFunction · 0.85
handleCloudProxyFunction · 0.85

Calls 2

testMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected