code: function matchArray(value, pattern, options) {
    if (!(value instanceof Array)) {
      return false;
    }
    if (!options.matchPartialArrays && pattern.length !== value.length) {
      return false;
    }
    if (pattern.length > value.length) {
      return false;
    }
    if (options.matchOutOfOrderArrays) {
      return pattern.every(
        (nestedMatch) => value.some(
          (nestedValue) => matchr(nestedValue, nestedMatch, options)
        )
      );
    }
    let valueIndex = 0;
    for (const nestedMatcher of pattern) {
      while (valueIndex < value.length && !matchr(value[valueIndex], nestedMatcher, options)) {
        valueIndex++;
      }
      if (valueIndex === value.length) {
        return false;
      }
    }
    return true;
  }
docs: private functions