@daniakash/pluralize
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Pluralize

A very tiny library to pluralize words!

Version Downloads Bundlephobia

Star on GitHub Watch on GitHub Twitter Follow


PRs Welcome 👍

Motivation

Pluralizing text is a very annoying task & this library aims to provide a lightweight, friendly API to achieve it.

Installation

yarn add @daniakash/pluralize

# or

npm i @daniakash/pluralize

Usage

import { pluralize } from "@daniakash/pluralize";

Pluralizing words that simply adds 's'

pluralize("apple", count); //=> apples

Pluralizing words that add a custom suffix

pluralize("child", count, { pluralSuffix: "ren" }); //=> children

Pluralizing words that needs a different word altogether

pluralize("sheep", count, { pluralTerm: "sheep" }); //=> sheep

Licenses

MIT © DaniAkash

Readme

Keywords

none

Package Sidebar

Install

npm i @daniakash/pluralize

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

12.3 kB

Total Files

12

Last publish

Collaborators

  • daniakash