function patch(node, polarity) {
  var data = node.data || {}

  data.polarity = polarity || 0
  data.valence = classify(polarity)

  node.data = data
}
function patch(node, polarity) {
  var data = node.data || {}

  data.polarity = polarity || 0
  data.valence = classify(polarity)

  node.data = data
}
function patch ( node , polarity ) { var data = node . data || { } data . polarity = polarity || 0 data . valence = classify ( polarity ) node . data = data }
Patch a `polarity` and valence property on `node`s.
Patch a polarity and valence property on node s .