src/utils/bot-utils.js
/**
   * Makes a string of random symbols of the given length.
   * @param  {string} availableCharsString the collection of symbols to make the string from
   * @param  {number} length               the target length of the euphemism
   * @return {string}                      the result euphemism string, empty of no collection provided
   */
Makes a string of random symbols of the given length.
@param  {string} availableCharsString the collection of symbols to make the string from
@param  {number} length               the target length of the euphemism
@return {string}                      the result euphemism string, empty of no collection provided
Makes a string of random symbols of the given length . @param { string } availableCharsString the collection of symbols to make the string from @param { number } length the target length of the euphemism @return { string } the result euphemism string empty of no collection provided
static makeRandomString(availableCharsString, length) {
    let result = '';
    if (availableCharsString === undefined) {
      return result;
    }
    if (length === undefined) {
      length = DefaultRandomStringLength;
    }
    const charactersLength = availableCharsString.length;
    for (let i = 0; i < length; i++) {
      result += availableCharsString.charAt(Math.floor(Math.random() * charactersLength));
    }
    return result;
  }
static makeRandomString ( availableCharsString , length ) { let result = '' ; if ( availableCharsString === undefined ) { return result ; } if ( length === undefined ) { length = DefaultRandomStringLength ; } const charactersLength = availableCharsString . length ; for ( let i = 0 ; i < length ; i ++ ) { result += availableCharsString . charAt ( Math . floor ( Math . random ( ) * charactersLength ) ) ; } return result ; }
Makes a string of random symbols of the given length.
Makes a string of random symbols of the given length .