From 5305f23332653bd7abd792cf17661f0027cfc3bc Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Sat, 28 Jan 2017 20:15:10 -0600 Subject: [PATCH] Consistent naming of functions Until we make a decision on access modifier hints and adopt a respective coding style, consistency is king. --- react/features/base/util/randomUtil.js | 1 + react/features/base/util/roomnameGenerator.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/react/features/base/util/randomUtil.js b/react/features/base/util/randomUtil.js index c1d6bde4a..f99968404 100644 --- a/react/features/base/util/randomUtil.js +++ b/react/features/base/util/randomUtil.js @@ -69,6 +69,7 @@ export function randomInt(min, max) { * @param {number} length - The length of the string to return. * @param {string} characters - The characters from which the returned string is * to be constructed. + * @private * @returns {string} A string of random characters with the specified length. */ function _randomString(length, characters) { diff --git a/react/features/base/util/roomnameGenerator.js b/react/features/base/util/roomnameGenerator.js index 63adfaad7..2f15534e4 100644 --- a/react/features/base/util/roomnameGenerator.js +++ b/react/features/base/util/roomnameGenerator.js @@ -210,7 +210,7 @@ export function generateRoomWithoutSeparator() { // that names from patterns with more options). let name = randomElement(PATTERNS); - while (hasTemplate(name)) { + while (_hasTemplate(name)) { for (const template in CATEGORIES) { // eslint-disable-line guard-for-in const word = randomElement(CATEGORIES[template]); @@ -226,10 +226,11 @@ export function generateRoomWithoutSeparator() { * templates/categories. * * @param {string} s - String containing categories. + * @private * @returns {boolean} True if the specified string contains at least one of the * templates/categories; otherwise, false. */ -function hasTemplate(s) { +function _hasTemplate(s) { for (const template in CATEGORIES) { if (s.indexOf(template) >= 0) { return true;