Quellcode durchsuchen

Consistent naming of functions

Until we make a decision on access modifier hints and adopt a respective
coding style, consistency is king.
j8
Lyubomir Marinov vor 8 Jahren
Ursprung
Commit
5305f23332

+ 1
- 0
react/features/base/util/randomUtil.js Datei anzeigen

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

+ 3
- 2
react/features/base/util/roomnameGenerator.js Datei anzeigen

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

Laden…
Abbrechen
Speichern