docs: function regexCache(fn, str, opts) {
    var key = '_default_', regex, cached;
  
    if (!str && !opts) {
      if (typeof fn !== 'function') {
        return fn;
      }
      return basic[key] || (basic[key] = fn(str));
    }
  
    var isString = typeof str === 'string';
    if (isString) {
      if (!opts) {
        return basic[str] || (basic[str] = fn(str));
      }
      key = str;
    } else {
      opts = str;
    }
  
    cached = cache[key];
    if (cached && equal(cached.opts, opts)) {
      return cached.regex;
    }
  
    memo(key, opts, (regex = fn(str, opts)));
    return regex;
  }