0.0.3 β€’ Published 6 years ago

just-pluralize v0.0.3

Weekly downloads
6
License
ISC
Repository
github
Last release
6 years ago

just-pluralize

A simple singularized tool for all your pluralization problems.

All you have to do is install the package, import the 'pluralize' method and you are ready to get going.

Install

$ npm i just-pluralize

Import

import { pluralize } from 'just-pluralize';

Usage

pluralize('son', 1) // -> 'son' πŸ‘ΆπŸ»

pluralize('dog', 3) // -> 'dogs' πŸ• πŸ• πŸ•

pluralize('candy', 6, 'candies') // -> 'candies' 🍬 🍬 🍬 🍬 🍬 🍬

Props

NameTypeDescription
singular word(required)stringThis the word that you want to pluralize
count(optional)numberThe count on which the word would be pluralized
plural word(optional)stringThis word must be passed in case the plural word is different from the passed singular word