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

Function addSuffix

apps/sim/lib/core/utils/restore-name.ts:36–44  ·  view source on GitHub ↗
(name: string, suffix: string, hasExtension?: boolean)

Source from the content-addressed store, hash-verified

34}
35
36function addSuffix(name: string, suffix: string, hasExtension?: boolean): string {
37 if (hasExtension) {
38 const dotIndex = name.lastIndexOf('.')
39 if (dotIndex > 0) {
40 return `${name.slice(0, dotIndex)}${suffix}${name.slice(dotIndex)}`
41 }
42 }
43 return `${name}${suffix}`
44}

Callers 1

generateRestoreNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected