Skip to content

Portable from python package small library for getting russian text with singular and plural forms

License

Notifications You must be signed in to change notification settings

icetemple/npm-rusn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusn

ci Coverage Status

Small library without deps for getting russian text with singular and plural forms

Installation

npm install rusn

Usage

import { rusPluralize } from "rusn";

const appleForms = ["яблоко", "яблока", "яблок"];

console.log(rusPluralize(1, appleForms)); // яблоко

console.log(rusPluralize(10, appleForms)); // яблок