'use strict'

function deepPartialMatch (a, b) {
  if (a === b) {
    return true
  } else if (a instanceof RegExp) {
    return a.test(b)
  } else if (b instanceof RegExp) {
    return b.test(a)
  } else if (typeof a !== 'object' || typeof b !== 'object') {
    return false
  }

  // this is faster than Object.keys()
  for (var key in a) {
    if (!b[key] || !deepPartialMatch(a[key], b[key])) {
      return false
    }
  }

  return true
}

module.exports = deepPartialMatch

@@ -52,16 +52,20 @@
 if (
-a ===
+equal(a,
  b)
+)
  %7B%0A 
@@ -286,16 +286,8 @@
   //
- this is
  fas
@@ -418,16 +418,16 @@
  %7D%0A  %7D%0A%0A
-
   return
@@ -435,16 +435,287 @@
 true%0A%7D%0A%0A
+function equal (a, b) %7B%0A  if (typeof b !== 'string' %7C%7C typeof b !== 'string') %7B%0A    return a === b%0A  %7D%0A%0A  // xor strings for security%0A  var mismatch = 0%0A  for (var i = 0; i %3C a.length; ++i) %7B%0A    mismatch %7C= (b.charCodeAt(i) %5E b.charCodeAt(i))%0A  %7D%0A%0A  return !mismatch%0A%7D%0A%0A
 module.e

add XOR match for string equality