MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / plural

Function plural

source code/utils/stringUtils.ts:34–40  ·  view source on GitHub ↗
(
  n: number,
  word: string,
  pluralWord = word + 's',
)

Source from the content-addressed store, hash-verified

32 * @example plural(2, 'entry', 'entries') → 'entries'
33 */
34export function plural(
35 n: number,
36 word: string,
37 pluralWord = word + 's',
38): string {
39 return n === 1 ? word : pluralWord
40}
41
42/**
43 * Returns the first line of a string without allocating a split array.

Callers 15

runFunction · 0.85
renderToolResultMessageFunction · 0.85
createContentSummaryFunction · 0.85
formatWarningsFunction · 0.85
useKeybindingWarningsFunction · 0.85
CollapseStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected