react-plural
v1.0.1
Published
react plural functon for declensions based on numbers
Downloads
5
Maintainers
Readme
react-plural
react plural functon for declensions based on numbers
Install
npm install --save react-plural
Usage
import { plural } from 'react-plural'
...
plural(1, 'one', 'two', 'five');
//=> one
plural(2, 'one', 'two', 'five');
//=> two
plural(5, 'one', 'two', 'five');
//=> five
plural(31, 'день', 'дня', 'дней');
//=> день
plural(22, 'день', 'дня', 'дней');
//=> дня
plural(15, 'день', 'дня', 'дней');
//=> дней
plural(1, 'day', 'days', 'days');
//=> day
plural(2, 'day', 'days', 'days');
//=> days
plural(5, 'day', 'days', 'days');
//=> days
...
License
MIT © zalash333