docs: function wrap(walker) {
    /**
     * @param {string} path
     * @param {RegExp|string|string[]} [pattern=/./]
     * @param {number} [depth=0]
     */
    return (path, pattern = /./, depth = 0) => {
      if (pattern instanceof RegExp) {
        // nothing to do
      } else if (typeof pattern === 'string') {
        pattern = RegExp(`${escapeRegexp(pattern)}$`, 'i');
      } else if (pattern instanceof Array) {
        pattern = `(?:${pattern.map(escapeRegexp).join('|')})$`;
        pattern = RegExp(pattern, 'i');
      } else {
        pattern = /./;
      }
      return walker(path, pattern, depth);
    };
  }