A whole bunch of whitespace linting - no functional changes

This commit is contained in:
Dave Conway-Jones
2019-08-11 13:37:15 +01:00
parent 8e2352b08a
commit e20cf97fce
20 changed files with 154 additions and 184 deletions

View File

@@ -55,7 +55,7 @@ module.exports = function(RED) {
if (flag) {
RED.nodes.addCredentials(n.id,{userid:this.userid, password:this.password, global:true});
}
if (n.tls === false){
if (n.tls === false) {
this.tls = false;
}
var node = this;
@@ -289,7 +289,7 @@ module.exports = function(RED) {
// and pass in the email message. The parser will signal when it has parsed the message.
SimpleParser(data, {}, function(err, parsed) {
//node.log(util.format("SimpleParser: on(end): %j", mailObject));
if (err){
if (err) {
node.status({fill:"red", shape:"ring", text:"email.status.parseerror"});
node.error(RED._("email.errors.parsefail", {folder:node.box}), err);
}
@@ -391,7 +391,7 @@ module.exports = function(RED) {
imapMessage.on('body', function(stream, info) {
//console.log("> message - body - stream=?, info=%j", info);
SimpleParser(stream, {}, function(err, parsed) {
if (err){
if (err) {
node.status({fill:"red", shape:"ring", text:"email.status.parseerror"});
node.error(RED._("email.errors.parsefail", {folder:node.box}),err);
}

View File

@@ -10,7 +10,7 @@ module.exports = function(RED) {
RED.nodes.createNode(this,n);
this.title = n.title;
var node = this;
node.on("input",function(msg) {
var title = node.title || msg.topic;
if (typeof msg.payload === 'object') {

View File

@@ -519,10 +519,10 @@ module.exports = function(RED) {
}
});
function filterdActiveDevices(devices){
function filterdActiveDevices(devices) {
var activeDevices = [];
for(var i=0;i<devices.length;i++){
if(devices[i].active){
for (var i=0; i<devices.length; i++) {
if (devices[i].active) {
activeDevices.push(devices[i]);
}
}

View File

@@ -76,7 +76,7 @@ module.exports = function(RED) {
// Is it base64 encoded or binary?
var attachmentString = attachment.toString();
var attachmentBuffer = Buffer.from(attachmentString,'base64');
if(attachmentString === attachmentBuffer.toString('base64')) {
if (attachmentString === attachmentBuffer.toString('base64')) {
// If converts back to same, then it was base64 so set to binary
// https://stackoverflow.com/a/48770228
attachment = attachmentBuffer;

View File

@@ -505,7 +505,7 @@ module.exports = function(RED) {
var missingUsernames = Object.keys(missingUsers).join(",");
return node.twitterConfig.getUsers(missingUsernames).then(function() {
var len = tweets.length;
for (var i = 0;i < len; i++) {
for (var i = 0; i < len; i++) {
var tweet = messages[i];
var output = tweets[i];
output.sender = userObjectCache[tweet.message_create.sender_id];