MCPcopy Create free account
hub / github.com/simstudioai/sim / mergeVersionTokens

Function mergeVersionTokens

apps/sim/app/(landing)/models/utils.ts:262–279  ·  view source on GitHub ↗
(tokens: string[])

Source from the content-addressed store, hash-verified

260}
261
262function mergeVersionTokens(tokens: string[]): string[] {
263 const merged: string[] = []
264
265 for (let index = 0; index < tokens.length; index += 1) {
266 const current = tokens[index]
267 const next = tokens[index + 1]
268
269 if (/^\d{1,2}$/.test(current) && /^\d{1,2}$/.test(next)) {
270 merged.push(`${current}.${next}`)
271 index += 1
272 continue
273 }
274
275 merged.push(current)
276 }
277
278 return merged
279}
280
281function formatModelToken(token: string): string {
282 const normalized = token.toLowerCase()

Callers 1

formatModelDisplayNameFunction · 0.85

Calls 2

testMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected