Pluralization engine for modern Javascript/Typescript projects. Ultra low footprint (< 3 KB) thanks to its modular design.
👉 Declarative
👉 Functional
👉 Composable
👉 Isomorphic
👉 Typescript
👉 ES2018
👉 Deterministic
👉 Modular
🎉 No dependencies!
Yarn
yarn add pluralize-js
NPM
npm install pluralize-js
import pluralize from 'pluralize-js'
pluralize(3, 'library', 'libraries') // "3 libraries"
pluralize(1, 'woman', 'women') // 1 woman
pluralize(794, 'shitty js library', 'shitty js libraries') // 794 shitty js libraries
We always looking for contributors to help maintain this library! Feel free to submit a PR and make sure to tag it with an appropriate label.