MCPcopy Index your code
hub / github.com/refined-github/refined-github / abbreviateString

Function abbreviateString

source/helpers/abbreviate-string.ts:1–5  ·  view source on GitHub ↗
(string: string, length: number)

Source from the content-addressed store, hash-verified

1export default function abbreviateString(string: string, length: number): string {
2 return string.length < length
3 ? string
4 : string.slice(0, length) + '…';
5}

Callers 3

renderBranchesFunction · 0.85
createLinkFunction · 0.85
addToNewReleaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected