function checkEligibility(episode) {
  if (!episode.hasOwnProperty('drm') || typeof (episode.drm) !== "boolean") {
    return false;
  }
  if (!episode.hasOwnProperty('episodeCount') || typeof episode.episodeCount !== "number") {
    return false;
  }
  if (episode.drm !== true || episode.episodeCount <= 0) {
    return false;
  }
  return true;
}
/**
Function checks if the episode is eligible to be sent in the response by
checking for the drm and episode coun
This function is called recursively until all the elements in the 
payload array are processed.
*/
Function checks if the episode is eligible to be sent in the response by
checking for the drm and episode coun
This function is called recursively until all the elements in the
payload array are processed.
Function checks if the episode is eligible to be sent in the response by checking for the drm and episode coun This function is called recursively until all the elements in the payload array are processed .
function checkEligibility(episode) {
  if (!episode.hasOwnProperty('drm') || typeof (episode.drm) !== "boolean") {
    return false;
  }
  if (!episode.hasOwnProperty('episodeCount') || typeof episode.episodeCount !== "number") {
    return false;
  }
  if (episode.drm !== true || episode.episodeCount <= 0) {
    return false;
  }
  return true;
}
function checkEligibility ( episode ) { if ( ! episode . hasOwnProperty ( 'drm' ) || typeof ( episode . drm ) !== "boolean" ) { return false ; } if ( ! episode . hasOwnProperty ( 'episodeCount' ) || typeof episode . episodeCount !== "number" ) { return false ; } if ( episode . drm !== true || episode . episodeCount <= 0 ) { return false ; } return true ; }
Function checks if the episode is eligible to be sent in the response by
checking for the drm and episode coun
This function is called recursively until all the elements in the
payload array are processed.
Function checks if the episode is eligible to be sent in the response by checking for the drm and episode coun This function is called recursively until all the elements in the payload array are processed .