MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / truncateSnippet

Function truncateSnippet

packages/lint/src/utils.ts:334–339  ·  view source on GitHub ↗
(value: string, maxLength = 220)

Source from the content-addressed store, hash-verified

332}
333
334export function truncateSnippet(value: string, maxLength = 220): string | undefined {
335 const normalized = value.replace(/\s+/g, " ").trim();
336 if (!normalized) return undefined;
337 if (normalized.length <= maxLength) return normalized;
338 return `${normalized.slice(0, maxLength - 3)}...`;
339}

Callers 9

extractMediaUrlsFunction · 0.90
media.tsFile · 0.90
textures.tsFile · 0.90
core.tsFile · 0.90
gsap.tsFile · 0.90
composition.tsFile · 0.90
scanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected