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:
parent
acbf3adab7
commit
5305f23332
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue