mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Update node-red-nodes sample, analysis, storage and time nodes to use strict and pass jshint scan
This commit is contained in:
@@ -14,18 +14,20 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||
var WordPos = require('wordpos');
|
||||
var wordpos = new WordPos();
|
||||
module.exports = function(RED) {
|
||||
"use strict";
|
||||
var WordPos = require('wordpos');
|
||||
var wordpos = new WordPos();
|
||||
|
||||
function WordPOSNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.on("input", function(msg) {
|
||||
var node = this;
|
||||
wordpos.getPOS(msg.payload, function (result) {
|
||||
msg.pos = result;
|
||||
node.send(msg);
|
||||
function WordPOSNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.on("input", function(msg) {
|
||||
var node = this;
|
||||
wordpos.getPOS(msg.payload, function (result) {
|
||||
msg.pos = result;
|
||||
node.send(msg);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("wordpos",WordPOSNode);
|
||||
}
|
||||
RED.nodes.registerType("wordpos",WordPOSNode);
|
||||
|
Reference in New Issue
Block a user