3.0.1 • Published 5 years ago

ruplu v3.0.1

Weekly downloads
17
License
MIT
Repository
github
Last release
5 years ago

RuPlu

Russian words plural form helper

Склонение множественного числа существительных

Build Status Known Vulnerabilities

NPM

Install

$ npm install ruplu --save

Usage

const ruplu = require('ruplu');
// OR
import ruplu from 'ruplu';

const cats = ruplu([
  'кошка',  // 1 кошка
  'кошки',  // 2 кошки
  'кошек'   // 5 кошек
]);

Just word

cats(1);  // => 'кошка'
cats(3);  // => 'кошки'
cats(6);  // => 'кошек'

Word with count

cats(1, true);  // => '1 кошка'
cats(3, true);  // => '3 кошки'
cats(6, true);  // => '6 кошек'

Word with count and custom delimiter

cats(1, true, ' ');  // => '1 кошка'
cats(3, true, '_');       // => '3_кошки'
cats(6, true, '*');       // => '6*кошек'

Testing

$ npm install && npm test
3.0.1

5 years ago

3.0.0

5 years ago

2.0.1

7 years ago

2.0.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago