Showing 200 of 405 total issues
Function toByteArray
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function toByteArray (b64) {
var tmp
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
Function copy
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
Function verifyInputParams
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function verifyInputParams(info){
info.opts = changing(txtToSql.defaultOpts, info.opts || {});
txtToSql.detectBooleans = info.opts.detectBooleans;
info.messages=txtToSql.dictionary[info.opts.lang];
var errors=[];
Function registerJson4All
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bestGlobals.registerJson4All = function registerJson4All(JSON4all){
JSON4all.addType(Date, {
specialTag: function specialTag(value){
if(value.isRealDate){
return 'date';
Function define
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.define = function define(){
var argPos=0;
var name;
var dependencies=['require'];
var factory;
Function requireBro
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.require = function requireBro(name){
if(window.require.definedModules[name]){
return window.require.definedModules[name];
}else{
var moduleName=name.replace(/^(\.\/)?(.*\/)*([^./]+)(\.js)?$/, function(match, fromThisPath, path, moduleName, extJs){
Function toHms
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.toHms = function toHms(omitSeconds, withDays, omitLeftCeros) {
var leftCero = omitLeftCeros?'':'0';
var tm = this.timeInterval.ms;
var prefix = (tm<0?'-':'');
var tdiff = [];
Function getCodec
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
iconv.getCodec = function getCodec(encoding) {
if (!iconv.encodings)
iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
Function browserifyOutDated
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function browserifyOutDated(moduleName, relativeModuleFileName, exposedName, outputDir) {
var moduleDir = './node_modules/'+moduleName+'/';
var registry='./tools/versions.json';
var regJSON, modJSON;
var mustUpdate = false;
Function 21
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
},{"safer-buffer":25}],21:[function(require,module,exports){
"use strict";
var BOMChar = '\uFEFF';
- 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 fromByteArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = []
Function fromByteArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = []
Function createInsertValues
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createInsertValues(info, rows) {
var inserts = [];
var group = [];
rows.forEach(function(row, index){
var owedLength = 0;
Function createInsertValues
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createInsertValues(info, rows) {
var inserts = [];
var group = [];
rows.forEach(function(row, index){
var owedLength = 0;
Function compareForOrder
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bestGlobals.compareForOrder = function compareForOrder(sortColumns){
var thisModule = this;
return function forOrderComparator(row1,row2){
var column;
var i=0;
Function read
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
Function read
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
Function ymdHmsMm
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bestGlobals.datetime.ymdHmsMm = function ymdHmsMm(year, month, day, hour, minutes, seconds, ms, micros){
Function ymdHmsM
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bestGlobals.datetime.ymdHmsM = function ymdHmsM(y, m, d, hh, mm, ss, ms) {
Avoid deeply nested control flow statements. Open
Open
if(separated.length>1) {
brokenLine.cols += separated.length-1;
}