libwords
v0.6.0
Published
A simple library for word utilities
Downloads
6
Maintainers
Readme
libwords
libwords
is a tiny library for word utils.
DEVELOPMENT version
Usage
const ln = require("libnouns");
console.log(ln.plural(2, "apple")) // => 2 apples
console.log(ln.wordPlural("match")) // => matches
console.log(ln.wordSingular("queries")) // => query
console.log(ln.wordSingular("freebies", true)) // => freebie
The second parameter in ln.wordSingular
is whether the word, if it ends in "ies", should end in 'y' or 'ie'.