"wink-sentiment" handles negation intelligently; for example, phrase "good product" will get a positive score whereas "not a good product" gets a negative score. Here is a little more complex example:
// Load wink sentiment package.
var sentiment = require( 'wink-sentiment' );
// Let us try a product review with double negatives!
var result = sentiment( "I wasn't unconvinced about buying decision" );
console.log( result );