File size: 294 Bytes
c9c900b
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
/**
 * `1 file`, `2 files`: the count, a space, and the noun with an `s` unless
 * the count is one.
 *
 * @param count how many
 * @param noun the singular noun
 * @returns the phrase
 */
export const plural = (count: number, noun: string) =>
  count === 1 ? `1 ${noun}` : `${count} ${noun}s`