mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
ignore Eclipse files and resolve some Eclipse JSHint warnings
squashed 4 commits into 1
This commit is contained in:
parent
6f84526364
commit
98e3ff014e
21
.gitignore
vendored
21
.gitignore
vendored
@ -1,12 +1,17 @@
|
|||||||
node_modules
|
.config.json
|
||||||
credentials.json
|
.dist
|
||||||
flows*.json
|
.jshintignore
|
||||||
|
.jshintrc
|
||||||
|
.npm
|
||||||
|
.project
|
||||||
|
.sessions.json
|
||||||
|
.settings
|
||||||
|
.tern-project
|
||||||
*.backup
|
*.backup
|
||||||
*_cred*
|
*_cred*
|
||||||
|
coverage
|
||||||
|
credentials.json
|
||||||
|
flows*.json
|
||||||
nodes/node-red-nodes/
|
nodes/node-red-nodes/
|
||||||
.npm
|
node_modules
|
||||||
/coverage
|
|
||||||
.config.json
|
|
||||||
.sessions.json
|
|
||||||
public
|
public
|
||||||
.dist
|
|
||||||
|
7
.npmignore
Normal file
7
.npmignore
Normal file
@ -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.board.pinMode(node.pin, node.state);
|
||||||
node.on("input", function(msg) {
|
node.on("input", function(msg) {
|
||||||
if (node.state === "OUTPUT") {
|
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);
|
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);
|
node.board.digitalWrite(node.pin, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
if (this.mongoConfig) {
|
if (this.mongoConfig) {
|
||||||
var node = this;
|
var node = this;
|
||||||
|
var selector;
|
||||||
MongoClient.connect(this.mongoConfig.url, function(err,db) {
|
MongoClient.connect(this.mongoConfig.url, function(err,db) {
|
||||||
if (err) {
|
if (err) {
|
||||||
node.error(err);
|
node.error(err);
|
||||||
@ -183,7 +184,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
if (node.operation === "find") {
|
if (node.operation === "find") {
|
||||||
msg.projection = msg.projection || {};
|
msg.projection = msg.projection || {};
|
||||||
var selector = ensureValidSelectorObject(msg.payload);
|
selector = ensureValidSelectorObject(msg.payload);
|
||||||
var limit = msg.limit;
|
var limit = msg.limit;
|
||||||
if (typeof limit === "string" && !isNaN(limit)) {
|
if (typeof limit === "string" && !isNaN(limit)) {
|
||||||
limit = Number(limit);
|
limit = Number(limit);
|
||||||
@ -206,7 +207,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (node.operation === "count") {
|
} else if (node.operation === "count") {
|
||||||
var selector = ensureValidSelectorObject(msg.payload);
|
selector = ensureValidSelectorObject(msg.payload);
|
||||||
coll.count(selector, function(err, count) {
|
coll.count(selector, function(err, count) {
|
||||||
if (err) {
|
if (err) {
|
||||||
node.error(err);
|
node.error(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user