grammarize
v1.1.1
Published
Helper function to provide grammatical context for words
Downloads
4
Maintainers
Readme
grammarize
:books: A small helper function to provide some grammatical context to your numbers.
Install
$ npm i grammarize --save
Usage
import grammarize from 'grammarize';
const messageAmount = 5;
console.log(grammarize(messageAmount, 'message', 'messages'));
//=> messages
grammarize(amount, singular, plural)
amount
Type: number
singular
Type: string
plural
Type: string
License
MIT