npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

plural-ro

v1.0.0

Published

Display the correct form of the nouns in the romanian language when counted.

Downloads

10

Readme

plural-ro

Build Status

Automatically display the correct form of the nouns in the romanian language when counted.

Installation

As npm package

npm i -S plural-ro

Explanation

In compound numerals bigger than 100, the elements form a simple string without a connector : 101 – o sută unu, 113 – o sută treisprezece, 1.025 – o mie douăzeci şi cinci, 1.003 – o mie trei, 1.019 – o mie nouăsprezece, 1.037 – o mie treizeci şi şapte, 1.245 – o mie două sute patruzeci şi cinci, etc. The preposition de after numerals over 100 is not required if the numeral in the final position is not bigger that 19 (such as: 101 o sută unu, 206 două sute şase, 1.018 o mie optsprezece, 3.519 trei mii cinci sute nouăsprezece): 105 cărţi – o sută cinci cărţi, 1319 cărţi – o mie trei sute nouăsprezece cărţi, etc. If a numeral between 20 and 99 is in the final position, the preposition de must be used : 120 de cărţi – o sută douăzeci de cărţi, 1322 de cărţi – o mie trei sute douăzeci şi două de cărţi, etc.

Romanian Grammar by Dana Cojocaru

Usage

Basic usage

const pluralro = require('plural-ro').pluralro;
// import { pluralro } from 'plural-ro';

pluralro(1, 'obliect', 'obiecte'); // 1 obliect
pluralro(1, 'obliect', 'obiecte', 'n'); // un obliect
pluralro(1, 'obliect', 'obiecte', 'n', true); // Un obliect

pluralro(123, 'sticla', 'sticle'); // 123 de sticle
pluralro(1, 'sticla', 'sticle', 'f'); // o sticla
pluralro(1, 'sticla', 'sticle', 'f', true); // O sticla

API

Functions

de(number) ⇒ boolean

Appends "de" preposition if a numeral between 20 and 99 is in the final position.

Kind: global function
Returns: boolean - If should append "de" preposition

| Param | | --- | | number |

pluralro(count, singularWord, pluralWord, replaceOne, ucfirst) ⇒ string

Automatically display the correct form of the nouns in the romanian language when counted.

Kind: global function

| Param | Type | Default | Description | | --- | --- | --- | --- | | count | number | | Count | | singularWord | string | | Singular form | | pluralWord | string | | Plural form | | replaceOne | string | boolean | false | The gender of the noun | | ucfirst | boolean | false | |


You may also want to try inttorowords for converting numbers into romanian words.


License

MIT