Showing 58 of 91 total issues
Function exports
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
- 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 adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
angular.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function recursiveCopy
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function recursiveCopy(value, clone, references, visited, customizer) {
const type = detectType(value);
const copiedValue = copier_copy(value, type);
// return if not a collection value
Function exports
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha'],
files: ngConfig.files,
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Function keys
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
Function processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Function processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Function processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Function httpEtagInterceptorFactory
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
function httpEtagInterceptorFactory () {
function responseInterceptor (response) {
var itemCache = response.config.$$_itemCache
if (itemCache) {
- 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
Consider simplifying this complex logical expression. Open
Open
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
Function recursiveCopy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function recursiveCopy(value, clone, references, visited, customizer) {
Avoid too many return
statements within this function. Open
Open
return 'PluginArray';
Avoid too many return
statements within this function. Open
Open
return 'Map';
Avoid too many return
statements within this function. Open
Open
return 'Object';
Avoid too many return
statements within this function. Open
Open
return 'WeakSet';