MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / pluralize

Function pluralize

console/src/util.ts:91–100  ·  view source on GitHub ↗
(
  count: number | bigint,
  singular: string,
  plural: string,
)

Source from the content-addressed store, hash-verified

89 * Returns singular if count is exactly 1, otherwise returns plural.
90 */
91export function pluralize(
92 count: number | bigint,
93 singular: string,
94 plural: string,
95) {
96 if (count === 1) {
97 return singular;
98 }
99 return plural;
100}
101
102/**
103 * Capitalizes a string by capitalizing the first letter and optionally appending a period.

Callers 13

ClusterMetricsInnerFunction · 0.90
DeleteObjectModalFunction · 0.90
FreshnessGraphInnerFunction · 0.90
formatIntervalShortFunction · 0.90
ObjectColumnsContentFunction · 0.90
SourceStatisticsInnerFunction · 0.90
SinkStatisticsInnerFunction · 0.90
DropRoleWarningsFunction · 0.90
AlterClusterModalFunction · 0.90
UtilizationTooltipFunction · 0.90
ObjectDetailsCardFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected