mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	ignore Eclipse files and resolve some Eclipse JSHint warnings
squashed 4 commits into 1
This commit is contained in:
		
							
								
								
									
										21
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -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 | ||||
|   | ||||
							
								
								
									
										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.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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user