code: function checkTokenParam( valid, targetValue, key ) {
        // Once invalid, always invalid: fast-fail in this case
        if ( ! valid ) {
          return false;
        }
  
        // Without a target value, filtering doesn't mean much: move along
        if ( typeof targetValue === 'undefined' ) {
          return true;
        }
  
        var tokenPropToTest = token[ key ];
  
        if ( isRegExp( targetValue ) ) {
          // Special-case if the target value is a RegExp
          return targetValue.test( tokenPropToTest );
        }
  
        return tokenPropToTest === targetValue;
      }
docs: Reducer function to check token validity: start the token out as valid,
  then reduce through the provided filter parameters, updating the validity
  of the token after checking each value.
  
  @param  {Boolean}       valid       Reducer function memo value
  @param  {String|RegExp} targetValue The expected value of the specified property
  on this token, or else a RegExp against which
  to test that property
  @param  {String}        key         The key within the token to test
  @return {Boolean}                   Whether the token is still valid, after
  validating the provided key