0.2.0-dev • Published 6 years ago
libnouns v0.2.0-dev
libnouns
libnouns
is a tiny library for noun 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)) // => freeebie
The second parameter in ln.wordSingular
is whether the word, if it ends in "ies", should end in 'y' or 'ie'