Apply consistent style to node-red-nodes

(not updating npm for this yet - just whitespace)
This commit is contained in:
dceejay
2015-05-11 19:25:39 +01:00
parent 84f61a0466
commit f497b57b7d
18 changed files with 278 additions and 273 deletions

View File

@@ -43,17 +43,17 @@ module.exports = function(RED) {
else { http = require("http"); }
this.on("input", function(msg) {
this.url = this.baseurl + '/input/post.json?';
if(msg.payload.indexOf(':') > -1){
if (msg.payload.indexOf(':') > -1){
this.url += 'json={' + msg.payload + '}';
} else {
this.url += 'csv='+msg.payload;
}
this.url += '&apikey='+this.apikey;
var nodegroup = this.nodegroup || msg.nodegroup;
if(nodegroup !== ""){
if (nodegroup !== ""){
this.url += '&node=' + nodegroup;
}
if(typeof msg.time !== 'undefined'){
if (typeof msg.time !== 'undefined'){
this.url += '&time=' + msg.time;
}
node.log("[emoncms] "+this.url);

View File

@@ -39,7 +39,7 @@ module.exports = function(RED) {
line += data.toString();
});
//ex.stderr.on('data', function (data) {
//console.log('[ping] stderr: ' + data);
//console.log('[ping] stderr: ' + data);
//});
ex.on('close', function (code) {
var m = regex.exec(line)||"";