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

Function stripVersionSuffix

packages/utils/src/string.ts:24–26  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

22 * stripVersionSuffix('a_v2_v3') // 'a_v2'
23 */
24export function stripVersionSuffix(value: string): string {
25 return value.replace(/_v\d+$/, '')
26}
27
28/**
29 * Tests whether `value` ends with a `_vN` version suffix.

Callers 15

getLatestVersionToolsFunction · 0.90
resolveToolIdFunction · 0.90
humanizeToolNameFunction · 0.90
index.tsFile · 0.90
getBlockMetaFunction · 0.90
getTemplatesForBlockFunction · 0.90
writeIconMappingFunction · 0.90

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected