code: function toRegexpSource(val, keys, options) {
    if (Array.isArray(val)) {
      return arrayToRegexp(val, keys, options);
    }
  
    if (val instanceof RegExp) {
      return regexpToRegexp(val, keys, options);
    }
  
    return stringToRegexp(val, keys, options);
  }
docs: Create a regexp source string from the given value.
  
  @param {string|array|regexp} val
  @param {array} keys
  @param {object} options
  @return {regexp}
  @api public