build/rekord.js
function propsMatch(test, testFields, expected, expectedFields, equals)
{
  var equality = equals || Rekord.equals;

  if ( isString( testFields ) ) // && isString( expectedFields )
  {
    return equality( test[ testFields ], expected[ expectedFields ] );
  }
  else // if ( isArray( testFields ) && isArray( expectedFields ) )
  {
    for (var i = 0; i < testFields.length; i++)
    {
      var testProp = testFields[ i ];
      var expectedProp = expectedFields[ i ];

      if ( !equality( test[ testProp ], expected[ expectedProp ] ) )
      {
        return false;
      }
    }

    return true;
  }

  return false;
}
function propsMatch(test, testFields, expected, expectedFields, equals)
{
  var equality = equals || Rekord.equals;

  if ( isString( testFields ) ) // && isString( expectedFields )
  {
    return equality( test[ testFields ], expected[ expectedFields ] );
  }
  else // if ( isArray( testFields ) && isArray( expectedFields ) )
  {
    for (var i = 0; i < testFields.length; i++)
    {
      var testProp = testFields[ i ];
      var expectedProp = expectedFields[ i ];

      if ( !equality( test[ testProp ], expected[ expectedProp ] ) )
      {
        return false;
      }
    }

    return true;
  }

  return false;
}
function propsMatch ( test , testFields , expected , expectedFields , equals ) { var equality = equals || Rekord . equals ; if ( isString ( testFields ) ) // && isString( expectedFields ) { return equality ( test [ testFields ] , expected [ expectedFields ] ) ; } else // if ( isArray( testFields ) && isArray( expectedFields ) ) { for ( var i = 0 ; i < testFields . length ; i ++ ) { var testProp = testFields [ i ] ; var expectedProp = expectedFields [ i ] ; if ( ! equality ( test [ testProp ] , expected [ expectedProp ] ) ) { return false ; } } return true ; } return false ; }
Determines whether the properties on one object equals the properties on
another object.

@memberof Rekord
@param {Object} test -
The object to test for matching.
@param {String|String[]} testFields -
The property name or array of properties to test for equality on `test`.
@param {Object} expected -
The object with the expected values.
@param {String|String[]} expectedFields -
The property name or array of properties to test for equality on `expected`.
@param {equalityCallback} [equals] -
The equality function which compares two values and returns whether they
are considered equivalent.
@return {Boolean} -
True if the `testFields` properties on `test` are equivalent to the
`expectedFields` on `expected` according to the `equals` function.
Determines whether the properties on one object equals the properties on another object .