node_modules/pomelo-admin/node_modules/pomelo-scheduler/lib/cronTrigger.js
/**
 * Match the given value to the cronTime
 * @param value The given value
 * @param cronTime The cronTime
 * @return The match result
 */
Match the given value to the cronTime
@param value The given value
@param cronTime The cronTime
@return The match result
Match the given value to the cronTime @param value The given value @param cronTime The cronTime @return The match result
function timeMatch(value, cronTime){
  if(typeof(cronTime) == 'number'){
    if(cronTime == -1)
      return true;
    if(value == cronTime)
      return true;
    return false;
  }else if(typeof(cronTime) == 'object' && cronTime instanceof Array){
    if(value < cronTime[0] || value > cronTime[cronTime.length -1])
      return false;
    for(var i = 0; i < cronTime.length; i++)
      if(value == cronTime[i])
        return true;
    return false;
  }
  return null;
}
function timeMatch ( value , cronTime ) { if ( typeof ( cronTime ) == 'number' ) { if ( cronTime == - 1 ) return true ; if ( value == cronTime ) return true ; return false ; } else if ( typeof ( cronTime ) == 'object' && cronTime instanceof Array ) { if ( value < cronTime [ 0 ] || value > cronTime [ cronTime . length - 1 ] ) return false ; for ( var i = 0 ; i < cronTime . length ; i ++ ) if ( value == cronTime [ i ] ) return true ; return false ; } return null ; }
Match the given value to the cronTime
 @param value The given value
 @param cronTime The cronTime
 @return The match result
Match the given value to the cronTime @param value The given value @param cronTime The cronTime @return The match result