This file contains hidden or 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
/** | |
* Defines the right word form suitable for number provided | |
* @param {Number} number | |
* @param {[String]} declensions | |
* @param {[Number]} cases | |
* @returns {String} | |
* @example | |
* const result = declension(10, ['монета', 'монеты', 'монет']) | |
* console.log(result) // 'монет' | |
*/ |
This file contains hidden or 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
/** | |
* Склонение существительных | |
* Правильная форма cуществительного рядом с числом (счетная форма). | |
* | |
* @example declension("файл", "файлов", "файла", 0);//returns "файлов" | |
* @example declension("файл", "файлов", "файла", 1);//returns "файл" | |
* @example declension("файл", "файлов", "файла", 2);//returns "файла" | |
* | |
* @param {string} oneNominative единственное число (именительный падеж) | |
* @param {string} severalGenitive множественное число (родительный падеж) |