code: function matchr(value, pattern, options) {
    options = Object.assign({}, DEFAULT_OPTIONS, options);
  
    // Identitical values always match.
    if (value === pattern) {
      return true;
    }
  
    // If the pattern is a function, execute it
    if (typeof pattern === 'function') {
      // Match native constructors by type
      const nativeConstructor = NATIVE_CONSTRUCTORS.find(
        (constructor) => constructor.Type === pattern
      );
      if (nativeConstructor) {
        return nativeConstructor.detect(value);
      }
      return pattern(value);
    }
  
    // Null values (which are also objects) only match if both are null.
    if (value == null || pattern == null) {
      return false;
    }
  
    // If the pattern is a regular expression, match it
    if (pattern instanceof RegExp) {
      if (value instanceof RegExp) {
        return String(pattern) === String(value);
      }
      if (value instanceof Date) {
        value = value.toISOString();
      }
      return pattern.test(value);
    }
  
    // Match Dates
    if (value instanceof Date) {
      return matchDate(value, pattern);
    }
  
    // Values that are no objects only match if they are identical (see above).
    if (typeof value !== 'object') {
      return false;
    }
  
    // Arrays match if all items in the pattern match.
    if (Array.isArray(pattern)) {
      return matchArray(value, pattern, options);
    }
  
    // Objects match if all properties in the pattern match.
    return matchObject(value, pattern, options);
  }
docs: exports