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

Function formatScope

scripts/draft-changelog.ts:409–433  ·  view source on GitHub ↗
(scope: string)

Source from the content-addressed store, hash-verified

407}
408
409export function formatScope(scope: string) {
410 const knownScopes = new Map([
411 ["api", "API"],
412 ["aws", "AWS"],
413 ["aws-lambda", "AWS Lambda"],
414 ["cli", "CLI"],
415 ["core", "Core"],
416 ["docs", "Docs"],
417 ["engine", "Engine"],
418 ["ffmpeg", "FFmpeg"],
419 ["producer", "Producer"],
420 ["readme", "README"],
421 ["studio", "Studio"],
422 ]);
423
424 const known = knownScopes.get(scope.toLowerCase());
425 if (known) {
426 return known;
427 }
428
429 return scope
430 .split(/[-_]/)
431 .map((part) => capitalize(part))
432 .join(" ");
433}
434
435function capitalize(value: string) {
436 if (!value) {

Callers 6

renderMdxWeeklyBulletFunction · 0.90
plainWeeklySummaryFunction · 0.90
renderCommitBulletFunction · 0.85
renderMdxCommitBulletFunction · 0.85
scopeTagsForCommitFunction · 0.85

Calls 2

getMethod · 0.80
capitalizeFunction · 0.70

Tested by

no test coverage detected