npm.io
0.1.0 • Published 7 years ago

pluralize-word

Licence
MIT
Version
0.1.0
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Stars
1

Pluralize Word

Build Status Coverage Status MIT license

Super simple pluralizing, with optional schema for manually handling irregular words

import pluralizeWord from 'pluralize-word';

pluralizeWord('dog', 2);
//=> '2 dogs'

API

pluralizeWord(subject, amount, options?)

subject

Type: string|string[]

Subject in the singular, or a schema array of ['singular', 'plural']

amount

Type: number

The amount of subjects

options

Type: object

Additional flags { excludeCount }

options.excludeCount

Type: boolean

Return only the modified subject without a leading count

Keywords