0.1.0 • Published 5 years ago

pluralize-word v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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