-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aeeb2e
commit d6b0f0b
Showing
2 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
|
||
# npm-rusn | ||
# rusn | ||
|
||
[![Build Status](https://travis-ci.org/icetemple/npm-rusn.svg?branch=master)](https://travis-ci.org/icetemple/npm-rusn) | ||
[![ci](https://github.com/icetemple/npm-rusn/actions/workflows/ci.yml/badge.svg)](https://github.com/icetemple/npm-rusn/actions/workflows/ci.yml) | ||
[![Coverage Status](https://coveralls.io/repos/github/icetemple/npm-rusn/badge.svg)](https://coveralls.io/github/icetemple/npm-rusn) | ||
|
||
Portable from python package small library for getting russian text with singular and plural forms | ||
Small library without deps for getting russian text with singular and plural forms | ||
|
||
## Installation | ||
|
||
`npm install rusn` | ||
|
||
|
||
## Example | ||
## Usage | ||
|
||
```js | ||
const appleForms = ['яблоко', 'яблока', 'яблок'] | ||
import { rusPluralize } from "rusn"; | ||
|
||
console.log(rusNGetText(1, appleForms)) // яблоко | ||
const appleForms = ["яблоко", "яблока", "яблок"]; | ||
|
||
console.log(rusNGetText(10, appleForms)) // яблок | ||
console.log(rusPluralize(1, appleForms)); // яблоко | ||
|
||
console.log(rusPluralize(10, appleForms)); // яблок | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters