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

2.1.0 • Public • Published

Pluralize-ptbr

Get the plural form of portuguese words (forked from https://www.npmjs.com/package/pluralize-ptbr)

$ npm install @umatch/pluralize-ptbr
const plural = require("./index");

console.log(plural('mão'));      // 'mãos'
console.log(plural('MaMão', 3)); // '3 MaMões'
console.log(plural('bola', 0))   // '0 bolas'
console.log(plural('bola', 0.5)) // '0.5 bola'
console.log(plural('bola', 1))   // '1 bola'

Partially implemented rules

  • Rules that depend on the stress of the syllables (e.g. for paroxytone words).
  • Rules for compound nouns (e.g. cana-de-açúcar => canas-de-açúcar).

Pending rules

  • Rules for words ending in 'ão'

Package Sidebar

Install

npm i @umatch/pluralize-ptbr

Weekly Downloads

3

Version

2.1.0

License

UNLICENSED

Unpacked Size

14.4 kB

Total Files

10

Last publish

Collaborators

  • umatch.tech