pluralize-word
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i pluralize-word

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

6.82 kB

Total Files

7

Last publish

Collaborators

  • djtb