index.js
function (expected, expectedIndex, value) {
   var i = expectedIndex - 1;
   var matchingRequires = 0
   while (i >= 0) {
      if (!isOptionalType(expected[i]) && isOfType(value, expected[i])) {
         matchingRequires++;
      }
      i--;
   }
   return matchingRequires;
}
function (expected, expectedIndex, value) {
   var i = expectedIndex - 1;
   var matchingRequires = 0
   while (i >= 0) {
      if (!isOptionalType(expected[i]) && isOfType(value, expected[i])) {
         matchingRequires++;
      }
      i--;
   }
   return matchingRequires;
}
function ( expected , expectedIndex , value ) { var i = expectedIndex - 1 ; var matchingRequires = 0 while ( i >= 0 ) { if ( ! isOptionalType ( expected [ i ] ) && isOfType ( value , expected [ i ] ) ) { matchingRequires ++ ; } i -- ; } return matchingRequires ; }
Counts the number of leading required arguments.
@param {Array} expected
@param {number} expectedIndex
@param {?} value
@returns {number}
@private
Counts the number of leading required arguments .