MCPcopy
hub / github.com/stemdeckapp/stemdeck / sanitizeFilename

Function sanitizeFilename

static/js/job.js:355–363  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

353}
354
355function sanitizeFilename(name) {
356 // Strip extension, collapse whitespace, cap at 120 chars — mirrors the
357 // backend _sanitize_title() so title and sourceUrl match on both sides.
358 return name
359 .replace(/\.[^.]+$/, "")
360 .replace(/\s+/g, " ")
361 .trim()
362 .slice(0, 120);
363}
364
365// Programmatic URL import — re-uses the full studio/SSE pipeline (same as the
366// import form's URL path). Used by the library "Sync again" auto-restore to

Callers 1

wireJobFormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected