Factor out common styles; fixes and improvements to post-thread-view
This commit is contained in:
parent
c712cbbfe2
commit
39483d92db
6 changed files with 160 additions and 100 deletions
9
src/view/lib/strings.ts
Normal file
9
src/view/lib/strings.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export function pluralize(n: number, base: string, plural?: string): string {
|
||||
if (n === 1) {
|
||||
return base
|
||||
}
|
||||
if (plural) {
|
||||
return plural
|
||||
}
|
||||
return base + 's'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue