Permalink
Browse files

ignore Eclipse files and resolve some Eclipse JSHint warnings

squashed 4 commits into 1
  • Loading branch information...
1 parent 6f84526 commit 98e3ff014edffab760810c546f74b3204ce328ab drwoods committed Apr 6, 2015
Showing with 25 additions and 12 deletions.
  1. +13 −8 .gitignore
  2. +7 −0 .npmignore
  3. +2 −2 nodes/core/hardware/35-arduino.js
  4. +3 −2 nodes/core/storage/66-mongodb.js
View
@@ -1,12 +1,17 @@
-node_modules
-credentials.json
-flows*.json
+.config.json
+.dist
+.jshintignore
+.jshintrc
+.npm
+.project
+.sessions.json
+.settings
+.tern-project
*.backup
*_cred*
+coverage
+credentials.json
+flows*.json
nodes/node-red-nodes/
-.npm
-/coverage
-.config.json
-.sessions.json
+node_modules
public
-.dist
View
@@ -0,0 +1,7 @@
+.settings
+.jshintignore
+.jshintrc
+.project
+.tern-project
+.travis.yml
+.git
@@ -121,10 +121,10 @@ module.exports = function(RED) {
node.board.pinMode(node.pin, node.state);
node.on("input", function(msg) {
if (node.state === "OUTPUT") {
- if ((msg.payload == true)||(msg.payload == 1)||(msg.payload.toString().toLowerCase() == "on")) {
+ if ((msg.payload === true)||(msg.payload == 1)||(msg.payload.toString().toLowerCase() == "on")) {
node.board.digitalWrite(node.pin, true);
}
- if ((msg.payload == false)||(msg.payload == 0)||(msg.payload.toString().toLowerCase() == "off")) {
+ if ((msg.payload === false)||(msg.payload === 0)||(msg.payload.toString().toLowerCase() == "off")) {
node.board.digitalWrite(node.pin, false);
}
}
@@ -163,6 +163,7 @@ module.exports = function(RED) {
if (this.mongoConfig) {
var node = this;
+ var selector;
MongoClient.connect(this.mongoConfig.url, function(err,db) {
if (err) {
node.error(err);
@@ -183,7 +184,7 @@ module.exports = function(RED) {
}
if (node.operation === "find") {
msg.projection = msg.projection || {};
- var selector = ensureValidSelectorObject(msg.payload);
+ selector = ensureValidSelectorObject(msg.payload);
var limit = msg.limit;
if (typeof limit === "string" && !isNaN(limit)) {
limit = Number(limit);
@@ -206,7 +207,7 @@ module.exports = function(RED) {
}
});
} else if (node.operation === "count") {
- var selector = ensureValidSelectorObject(msg.payload);
+ selector = ensureValidSelectorObject(msg.payload);
coll.count(selector, function(err, count) {
if (err) {
node.error(err);

0 comments on commit 98e3ff0

Please sign in to comment.