Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2do2go/slovoform.js
https://github.com/2do2go/slovoform.js
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/2do2go/slovoform.js
- Owner: 2do2go
- Created: 2013-04-26T08:29:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-05T12:00:54.000Z (over 11 years ago)
- Last Synced: 2024-04-25T18:01:56.588Z (9 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Slovoform
Library for plural and gender word forms for russian language#Examples
Very easy to use:
```js
var slovoform = require('slovoform'),
pluralize = new slovoform.Pluralize(),
genderify = new slovoform.Genderify();pluralize.add('час', 'часа', 'часов');
console.log(pluralize.get('час', 1));
//час
console.log(pluralize.get('час', 2));
//часа
console.log(pluralize.get('час', 5));
//часовgenderify.add('сказал', 'сказала');
console.log(genderify.get('сказал', 'male'));
//сказал
console.log(genderify.get('сказал', 'female'));
//сказала
```