@jipd/string-plural

1.0.0 • Public • Published

string-plural

Change words to plural versions based on passed count

Installation

npm install @jipd/string-plural

Usage

import pluralise from '@jipd/string-plural'

const noPlural = pluralise('apple', 1)
// noPlural = 'apple'

const withPluralEx1 = pluralise('apple', 0)
// withPluralEx1 = 'apples'

const withPluralEx2 = pluralise('apple', 2)
// withPluralEx2 = 'apples'

Package Sidebar

Install

npm i @jipd/string-plural

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

12.8 kB

Total Files

8

Last publish

Collaborators

  • jipd-js