MCPcopy
hub / github.com/21st-dev/1code / pluralize

Function pluralize

src/renderer/features/sidebar/utils/pluralize.ts:7–16  ·  view source on GitHub ↗
(
  count: number,
  singular: string,
  plural?: string
)

Source from the content-addressed store, hash-verified

5 * @param plural - Optional plural form (defaults to singular + 's')
6 */
7export function pluralize(
8 count: number,
9 singular: string,
10 plural?: string
11): string {
12 if (count === 1) {
13 return singular
14 }
15 return plural || `${singular}s`
16}

Callers 2

AgentsSubChatsSidebarFunction · 0.90
agents-sidebar.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected