mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Slight tweak to sentiment info to reflect reality.
This commit is contained in:
@@ -19,14 +19,13 @@ var sentiment = require('sentiment');
|
||||
|
||||
function SentimentNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
var node = this;
|
||||
|
||||
this.on("input", function(msg) {
|
||||
var node = this;
|
||||
sentiment(msg.payload, function (err, result) {
|
||||
msg.sentiment = result;
|
||||
node.send(msg);
|
||||
});
|
||||
sentiment(msg.payload, function (err, result) {
|
||||
msg.sentiment = result;
|
||||
node.send(msg);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
RED.nodes.registerType("sentiment",SentimentNode);
|
||||
|
Reference in New Issue
Block a user