Showing 7 of 63 total issues
Function 1
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bock=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var _ = require('./utils')
var store = require('./store')
var Proxy = require('./proxy')
File bock.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bock=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var _ = require('./utils')
var store = require('./store')
var Proxy = require('./proxy')
Function 4
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],4:[function(require,module,exports){
var serviceWorker = navigator.serviceWorker
var serviceInstance = null
var serviceWorkerInstance = null
Function 2
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./proxy":3,"./store":5,"./utils":6}],2:[function(require,module,exports){
var Bock = require('./bock')
var store = require('./store')
var service = require('./service')
var merge = require('./utils').merge
Function 3
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./bock":1,"./service":4,"./store":5,"./utils":6}],3:[function(require,module,exports){
module.exports = Proxy
function Proxy() {}
Function 5
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],5:[function(require,module,exports){
var buf = []
var store = exports
store.append = function (data) {
Function uuid
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.uuid = function () {
var uuid = '', i, random
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i === 8 || i === 12 || i === 16 || i === 20) uuid += '-'
- 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"