index.js
function one(node) {
    var children = node.children
    var length = children.length
    var polarity = 0
    var index = -1
    var child
    var hasNegation

    while (++index < length) {
      child = children[index]

      if (child.data && child.data.polarity) {
        polarity += (hasNegation ? -1 : 1) * child.data.polarity
      }

      // If the value is a word, remove any present negation.  Otherwise, add
      // negation if the node contains it.
      if (child.type === 'WordNode') {
        if (hasNegation) {
          hasNegation = false
        } else if (isNegation(child)) {
          hasNegation = true
        }
      }
    }

    patch(node, polarity)
  }
function one(node) {
    var children = node.children
    var length = children.length
    var polarity = 0
    var index = -1
    var child
    var hasNegation

    while (++index < length) {
      child = children[index]

      if (child.data && child.data.polarity) {
        polarity += (hasNegation ? -1 : 1) * child.data.polarity
      }

      // If the value is a word, remove any present negation.  Otherwise, add
      // negation if the node contains it.
      if (child.type === 'WordNode') {
        if (hasNegation) {
          hasNegation = false
        } else if (isNegation(child)) {
          hasNegation = true
        }
      }
    }

    patch(node, polarity)
  }
Patch all words in `parent`.