lib/read.js
function scoreCandidate (node, contentScore, candidates) {
  let score
  if (typeof node.data('readabilityScore') === 'undefined') {
    score = initializeNode(node)
    candidates.push(node)
  } else {
    score = node.data('readabilityScore') || 0
  }
  node.data('readabilityScore', score + contentScore)
}
function scoreCandidate (node, contentScore, candidates) {
  let score
  if (typeof node.data('readabilityScore') === 'undefined') {
    score = initializeNode(node)
    candidates.push(node)
  } else {
    score = node.data('readabilityScore') || 0
  }
  node.data('readabilityScore', score + contentScore)
}
function scoreCandidate ( node , contentScore , candidates ) { let score if ( typeof node . data ( 'readabilityScore' ) === 'undefined' ) { score = initializeNode ( node ) candidates . push ( node ) } else { score = node . data ( 'readabilityScore' ) || 0 } node . data ( 'readabilityScore' , score + contentScore ) }
Give a score to each node based on the Content.
@param node
@param contentScore
@param candidates
Give a score to each node based on the Content .