english-plurals
v3.3.0
Published
English plural of words
Downloads
836
Readme
English plurals
Features
Agreement of English words (singular / plural), based on a few rules and on linguistic resources.
You have to import and provide independently linguistic resources: use english-plurals-list
. If you do not provide linguistic resources, very basic rules will be used: adding s
or es
mainly.
Also see pluralize-me
that does the same thing with another approach (almost no resources, more rules, and allows plural to singular transformation).
Usage
getPlural
returns the plural of a singular word, based on:
- a list of exception elements where singular is the key and having a
plural
property: in general leave null - a list of irregular plurals: use
english-plurals-list
- the singular word
Installation
npm install english-plurals
Usage
const EnglishPlurals = require('english-plurals');
const Irregular = require('english-plurals-list/dist/plurals.json');
// women
console.log(EnglishPlurals.getPlural(Irregular, 'woman'));