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

Function sanitizePathSegment

apps/sim/lib/workflows/operations/import-export.ts:77–79  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

75 * Sanitizes a string for use as a path segment in a ZIP file.
76 */
77export function sanitizePathSegment(name: string): string {
78 return name.replace(/[^\p{L}\p{N}\-_]/gu, '-').replace(/-+/g, '-')
79}
80
81/**
82 * Downloads a file to the user's device.

Callers 11

useExportWorkflowFunction · 0.90
useExportFolderFunction · 0.90
buildPathFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
exportWorkflowsToZipFunction · 0.85
buildFolderPathFunction · 0.85
exportWorkspaceToZipFunction · 0.85
exportFolderToZipFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected