Consistent naming of functions

Until we make a decision on access modifier hints and adopt a respective
coding style, consistency is king.
This commit is contained in:
Lyubomir Marinov 2017-01-28 20:15:10 -06:00
parent acbf3adab7
commit 5305f23332
2 changed files with 4 additions and 2 deletions

View File

@ -69,6 +69,7 @@ export function randomInt(min, max) {
* @param {number} length - The length of the string to return. * @param {number} length - The length of the string to return.
* @param {string} characters - The characters from which the returned string is * @param {string} characters - The characters from which the returned string is
* to be constructed. * to be constructed.
* @private
* @returns {string} A string of random characters with the specified length. * @returns {string} A string of random characters with the specified length.
*/ */
function _randomString(length, characters) { function _randomString(length, characters) {

View File

@ -210,7 +210,7 @@ export function generateRoomWithoutSeparator() {
// that names from patterns with more options). // that names from patterns with more options).
let name = randomElement(PATTERNS); let name = randomElement(PATTERNS);
while (hasTemplate(name)) { while (_hasTemplate(name)) {
for (const template in CATEGORIES) { // eslint-disable-line guard-for-in for (const template in CATEGORIES) { // eslint-disable-line guard-for-in
const word = randomElement(CATEGORIES[template]); const word = randomElement(CATEGORIES[template]);
@ -226,10 +226,11 @@ export function generateRoomWithoutSeparator() {
* templates/categories. * templates/categories.
* *
* @param {string} s - String containing categories. * @param {string} s - String containing categories.
* @private
* @returns {boolean} True if the specified string contains at least one of the * @returns {boolean} True if the specified string contains at least one of the
* templates/categories; otherwise, false. * templates/categories; otherwise, false.
*/ */
function hasTemplate(s) { function _hasTemplate(s) {
for (const template in CATEGORIES) { for (const template in CATEGORIES) {
if (s.indexOf(template) >= 0) { if (s.indexOf(template) >= 0) {
return true; return true;