MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / sanitizeFileName

Function sanitizeFileName

apps/OpenSign/src/utils/sanitizeFileName.js:1–6  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

1export function sanitizeFileName(fileName) {
2 // Remove spaces and invalid characters
3 const file = fileName?.replace(/[^a-zA-Z0-9._-]/g, "");
4 const removedot = file?.replace(/\.(?=.*\.)/g, "");
5 return removedot?.replace(/[^a-zA-Z0-9._-]/g, "");
6}

Callers 4

saveToMySignFunction · 0.90
handleFileUploadFunction · 0.90
fetchUserSignFunction · 0.90
ManageSignFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected