JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q47915F
  • License MIT

Russian words plural form helper

Package Exports

  • ruplu

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ruplu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

RuPlu

Russian words plural form helper

Build Status

Install

$ npm install ruplu --save

Usage

var ruplu = require('ruplu');

var cats = ruplu.init([
  'кошка',  // 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