MCPcopy
hub / github.com/claude-code-best/claude-code / plural

Function plural

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

Source from the content-addressed store, hash-verified

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

Callers 15

renderToolResultMessageFunction · 0.85
createContentSummaryFunction · 0.85
runFunction · 0.85
formatWarningsFunction · 0.85
KeybindingSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected