homey-signal-validator
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -61,5 +61,11 @@ "use strict"; | ||
} | ||
if(data.some(function(word) { | ||
return (!signal.words || !signal.words[word]); | ||
})) res.result = false; | ||
if(signal.packing) { | ||
if (data.some(function (word) { | ||
return !(word >= 0 && word <= 0xFF); | ||
})) res.result = false; | ||
} else { | ||
if (data.some(function (word) { | ||
return (!signal.words || !signal.words[word]); | ||
})) res.result = false; | ||
} | ||
return res; | ||
@@ -252,7 +258,14 @@ } | ||
var res = !Object.keys(cmds).some(function(cmd) { | ||
return !_valid_pronto_string(signal.cmds[cmd]); | ||
return !_valid_pronto_string(cmds[cmd]); | ||
}); | ||
return {result: res, msg: 'invalid_pronto_cmd' }; | ||
return {result: res, msg: 'invalid_pronto_cmds' }; | ||
}, | ||
toggleCmds: function(cmds, signal) { | ||
var res = !Object.keys(cmds).some(function(cmd) { | ||
return !_valid_pronto_string(cmds[cmd]); | ||
}); | ||
return {result: res, msg: 'invalid_pronto_toggleCmds' }; | ||
}, | ||
repetitions: function(repetitions, signal) { | ||
@@ -287,3 +300,3 @@ var res = _valid_bounds(repetitions, rfBounds.repetitions.min, rfBounds.repetitions.max); | ||
var irBounds = { | ||
carrier: { min: 30000, max: 45000 }, | ||
carrier: { min: 30000, max: 58000 }, | ||
dutyCycle: { min: 30, max: 70 } | ||
@@ -380,2 +393,2 @@ }; | ||
module.exports = SignalValidator; | ||
module.exports = SignalValidator; |
{ | ||
"name": "homey-signal-validator", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": " Validator methods for Homey Signals", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
52396
8
418
0
3
70