lib/utils.js
Function setupCommands
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupCommands: function(commands, source, target) {
var self = this;
commands.forEach(function(command) {
target[command] = function(val, structureId) {
Function command
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
target[command] = function(val, structureId) {
if (command === "structures") {
return source;
}
var specialCmds = ["structureName", "deviceName"];
Avoid too many return
statements within this function. Open
Open
return target.write(self.toSnakeCase(command), val);
Avoid too many return
statements within this function. Open
Open
return res;