Showing 16 of 24 total issues
Function exports
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(filename, data, options, cb){
if(typeof options == 'function'){
cb = options;
options = {};
Function exports
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(filename, options, cb){
var connection = this;
if(typeof options == 'function'){
cb = options;
Function exports
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(filename, data, options, cb){
if(typeof options == 'function'){
cb = options;
options = {};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exports
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var BigInt = module.exports = function(n, v){
if(BigInt.isBigInt(n)){
this.buffer = new Buffer(n.buffer.length);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function compare
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
BigInt.prototype.compare = function(v){
if(!BigInt.isBigInt(v)) {
v = BigInt.toBigInt(this.buffer.length, v);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function writeFile
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeFile(fileWritten){
var offset = new bigint(8)
, stop = false
, nbRemainingPackets = 0
, maxPacketSize = new bigint(8, 0x00010000 - 0x71)
Function sub
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
BigInt.prototype.sub = function(v){
if(!BigInt.isBigInt(v)) {
v = BigInt.toBigInt(this.buffer.length, v);
}
Function writeRequest
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeRequest(message, buffer, offset){
var initOffset = offset
, needsRewrite = false
, tmpBuffer = new Buffer(buffer.length)
;
Function response
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
SMB2Forge.response = function(c){
c.responses = {};
c.responsesCB = {};
c.responseBuffer = new Buffer(0);
return function(response){
Function parseFile
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseFile(buffer){
var file = {}
, offset = 0
;
Function exports
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var SMB = module.exports = function(opt){
opt = opt || {};
// Parse share-string
Function sub
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
BigInt.prototype.sub = function(v){
if(!BigInt.isBigInt(v)) {
v = BigInt.toBigInt(this.buffer.length, v);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var BigInt = module.exports = function(n, v){
if(BigInt.isBigInt(n)){
this.buffer = new Buffer(n.buffer.length);
Function writeRequest
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function writeRequest(message, buffer, offset){
var initOffset = offset
, needsRewrite = false
, tmpBuffer = new Buffer(buffer.length)
;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function add
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
BigInt.prototype.add = function(v){
if(!BigInt.isBigInt(v)) {
v = BigInt.toBigInt(this.buffer.length, v);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function unTranslate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function unTranslate(key, value){
if(headerTranslates[key]){
for(var t in headerTranslates[key]){
if(headerTranslates[key][t] == value){
return t;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"