src/utils/bot-utils.js
/**
   * Check if text at the specified index is in quotes.
   * @see Utils.getQuoteSymbols
   * @param  {string}  text  the text to check
   * @param  {number}  index position in the text
   * @return {Boolean}       true if quoted, false otherwise
   */
Check if text at the specified index is in quotes.
@see Utils.getQuoteSymbols
@param  {string}  text  the text to check
@param  {number}  index position in the text
@return {Boolean}       true if quoted, false otherwise
Check if text at the specified index is in quotes . @see Utils . getQuoteSymbols @param { string } text the text to check @param { number } index position in the text @return { Boolean } true if quoted false otherwise
static isPlaceQuoted(text, index) {
    const textBefore = text.slice(0, Math.max(0, index));
    const quoteSymbols = Utils.getQuoteSymbols();
    for (const element of quoteSymbols) {
      if (Utils.getIndices(textBefore, element).length % 2 === 1) {
        return true;
      }
    }
    return false;
  }
static isPlaceQuoted ( text , index ) { const textBefore = text . slice ( 0 , Math . max ( 0 , index ) ) ; const quoteSymbols = Utils . getQuoteSymbols ( ) ; for ( const element of quoteSymbols ) { if ( Utils . getIndices ( textBefore , element ) . length % 2 === 1 ) { return true ; } } return false ; }
Check if text at the specified index is in quotes.
Check if text at the specified index is in quotes .