ruplu
v3.0.1
Published
Russian words plural form helper
Maintainers
Readme
RuPlu
Russian words plural form helper
Склонение множественного числа существительных
Install
$ npm install ruplu --saveUsage
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
