quartz-research-note/quartz/util/lang.ts
2023-09-02 18:07:26 -07:00

8 lines
148 B
TypeScript

export function pluralize(count: number, s: string): string {
if (count === 1) {
return `1 ${s}`
} else {
return `${count} ${s}s`
}
}