mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-18 07:25:15 +02:00
12 lines
295 B
TypeScript
12 lines
295 B
TypeScript
|
import { Pipe, PipeTransform } from "@angular/core";
|
||
|
|
||
|
@Pipe({
|
||
|
name: "pluralize",
|
||
|
standalone: true,
|
||
|
})
|
||
|
export class PluralizePipe implements PipeTransform {
|
||
|
transform(count: number, singular: string, plural: string): string {
|
||
|
return `${count} ${count === 1 ? singular : plural}`;
|
||
|
}
|
||
|
}
|