0d3d92d1bf
12 lines
257 B
TypeScript
12 lines
257 B
TypeScript
export function pluralize(count: number, s: string): string {
|
|||
if (count === 1) {
|
|||
return `1 ${s}`
|
|||
} else {
|
|||
return `${count} ${s}s`
|
|||
}
|
|||
}
|
|||
|
|||
export function capitalize(s: string): string {
|
|||
return s.substring(0, 1).toUpperCase() + s.substring(1)
|
|||
}
|