mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
A whole bunch of whitespace linting - no functional changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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') {
|
||||
|
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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];
|
||||
|
Reference in New Issue
Block a user