# plur

> Pluralize a word

Latest version **6.0.0** (published 2025-11-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install plur
pnpm add plur
yarn add plur
bun add plur
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2025-11-02 |
| First published | 2015-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 254 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | plural, plurals, pluralize, singular, count, word, string, irregular, noun, nouns |

## Links

- npm: https://www.npmjs.com/package/plur
- Repository: https://github.com/sindresorhus/plur
- Homepage: https://github.com/sindresorhus/plur#readme
- Issues: https://github.com/sindresorhus/plur/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/plur

## Dependencies (1)

- [irregular-plurals](https://npm.io/package/irregular-plurals.md) ^4.2.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 6.0.0 (latest) — 2025-11-02
- 5.1.0 — 2021-12-19
- 5.0.0 — 2021-11-04
- 4.0.0 — 2020-02-16
- 3.1.1 — 2019-04-08
- 3.1.0 — 2019-04-06
- 3.0.1 — 2018-04-29
- 3.0.0 — 2018-04-08
- 2.1.2 — 2015-12-23
- 2.1.1 — 2015-11-17
- 2.1.0 — 2015-11-11
- 2.0.0 — 2015-06-26
- 1.0.0 — 2015-06-21

## README

# plur

> Pluralize a word

## Install

```sh
npm install plur
```

## Usage

```js
import plur from 'plur';

plur('rainbow');
//=> 'rainbows'

plur('unicorn', 4);
//=> 'unicorns'

plur('puppy', 2);
//=> 'puppies'

plur('box', 2);
//=> 'boxes'

plur('cactus', 2);
//=> 'cacti'
```

## API

### plur(word, plural?, count?)

#### word

Type: `string`

The word to pluralize.

#### plural

Type: `string`\
Default:

- Irregular nouns will use this [list](https://github.com/sindresorhus/irregular-plurals/blob/main/irregular-plurals.json).
- Words ending in *s*, *x*, *z*, *ch*, *sh* will be pluralized with *-es* (eg. *foxes*).
- Words ending in *y* that are preceded by a consonant will be pluralized by replacing *y* with *-ies* (eg. *puppies*).
- All other words will have "s" added to the end (eg. *days*).

Explicitly provide the pluralized word.

The plural suffix will match the case of the last letter in the word.

This option is only for extreme edge-cases. You probably won't need it.

#### count

Type: `number`

The count to determine whether to use singular or plural. If omitted, defaults to plural.

---
_Source: https://npm.io/package/plur · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
