set mask(val) {
    let trueVal;

    // In cases where the mask is a string (Legacy Soho Mask), the string is automatically converted
    // to an array containing regex patterns.
    // In cases where the mask is a function, the function call is stored and called when the mask
    // needs to be processed.
    if (Array.isArray(val) || typeof val === 'function') {
      trueVal = val;
    } else {
      // Assume string in all other cases
      switch (val) {
      // Using 'date' as a string automatically connects the standard date mask function
      case 'date':
        trueVal = dateMask;
        break;
      // Using 'number' as a string automatically connects the standard number mask function
      case 'number':
        trueVal = numberMask;
        break;
      default:
        trueVal = convertPatternFromString(val);
        break;
      }
    }

    this.maskState.pattern = trueVal;
  }
/**
   * Sets the Mask pattern to be used.
   * @param {string|Function|Array<string|RegExp>} val the mask pattern on which to conform input
   */
Sets the Mask pattern to be used.
@param {string|Function|Array} val the mask pattern on which to conform input
Sets the Mask pattern to be used . @param { string|Function|Array } val the mask pattern on which to conform input
set mask(val) {
    let trueVal;
    if (Array.isArray(val) || typeof val === 'function') {
      trueVal = val;
    } else {
      switch (val) {
      case 'date':
        trueVal = dateMask;
        break;
      case 'number':
        trueVal = numberMask;
        break;
      default:
        trueVal = convertPatternFromString(val);
        break;
      }
    }
    this.maskState.pattern = trueVal;
  }
set mask ( val ) { let trueVal ; if ( Array . isArray ( val ) || typeof val === 'function' ) { trueVal = val ; } else { switch ( val ) { case 'date' : trueVal = dateMask ; break ; case 'number' : trueVal = numberMask ; break ; default : trueVal = convertPatternFromString ( val ) ; break ; } } this . maskState . pattern = trueVal ; }
Sets the Mask pattern to be used.
Sets the Mask pattern to be used .
// In cases where the mask is a string (Legacy Soho Mask), the string is automatically converted // to an array containing regex patterns. // In cases where the mask is a function, the function call is stored and called when the mask // needs to be processed. // Assume string in all other cases // Using 'date' as a string automatically connects the standard date mask function // Using 'number' as a string automatically connects the standard number mask function