Showing 58 of 91 total issues
File angular-http-etag.js
has 1017 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* angular-http-etag v2.0.18
* Shaun Grady (http://shaungrady.com), 2018
* https://github.com/shaungrady/angular-http-etag
* Module Format: Universal Module Definition
Function httpEtagHttpDecorator
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
Open
function httpEtagHttpDecorator ($delegate, httpEtag) {
var $http = $delegate
var cachableHttpMethods = [
'GET',
'JSONP'
- 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
File index.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* angular-http-etag v2.0.18
* Shaun Grady (http://shaungrady.com), 2018
* https://github.com/shaungrady/angular-http-etag
* Module Format: CommonJS
Function service_httpEtagProvider
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function service_httpEtagProvider () {
var httpEtagProvider = this
var serviceAdapterMethods = [
'createCache',
Function service_httpEtagProvider
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function service_httpEtagProvider () {
var httpEtagProvider = this
var serviceAdapterMethods = [
'createCache',
Function httpEtagProvider
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagProvider () {
var httpEtagProvider = this
var serviceAdapterMethods = [
'createCache',
Function httpEtagHttpDecorator
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagHttpDecorator ($delegate, httpEtag) {
var $http = $delegate
var cachableHttpMethods = [
'GET',
'JSONP'
Function httpEtagHttpDecorator
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagHttpDecorator ($delegate, httpEtag) {
var $http = $delegate
var cachableHttpMethods = [
'GET',
'JSONP'
Function httpEtagHttpDecorator
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function httpEtagHttpDecorator ($delegate, httpEtag) {
var $http = $delegate
var cachableHttpMethods = [
'GET',
'JSONP'
Function httpEtagFactory
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {
var httpEtagService = {}
var services = {}
var adaptedServices = {}
Function httpEtagFactory
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {
var httpEtagService = {}
var services = {}
var adaptedServices = {}
Function httpEtagFactory
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
httpEtagProvider.$get = ['$injector', function httpEtagFactory ($injector) {
var httpEtagService = {}
var services = {}
var adaptedServices = {}
Function typeDetect
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function typeDetect(obj) {
/* ! Speed optimisation
* Pre:
* string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)
* boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)
Function cacheAdaptersConfig
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cacheAdaptersConfig (httpEtagProvider) {
httpEtagProvider
.defineCacheServiceAdapter('$cacheFactory', {
config: {
Function cacheAdaptersConfig
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cacheAdaptersConfig (httpEtagProvider) {
httpEtagProvider
.defineCacheServiceAdapter('$cacheFactory', {
config: {
Function cacheAdaptersConfig
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cacheAdaptersConfig (httpEtagProvider) {
httpEtagProvider
.defineCacheServiceAdapter('$cacheFactory', {
config: {
Function httpEtagProvider
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Open
function httpEtagProvider () {
var httpEtagProvider = this
var serviceAdapterMethods = [
'createCache',
- 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 $httpDecorator
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $httpDecorator (httpConfig) {
var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()
var hasConfig = !!httpConfig.etagCache
var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0
var isCachable = hasConfig && isCacheableMethod
Function $httpDecorator
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $httpDecorator (httpConfig) {
var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()
var hasConfig = !!httpConfig.etagCache
var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0
var isCachable = hasConfig && isCacheableMethod
Function $httpDecorator
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $httpDecorator (httpConfig) {
var useLegacyPromiseExtensions = httpEtagHttpDecorator.useLegacyPromiseExtensions()
var hasConfig = !!httpConfig.etagCache
var isCacheableMethod = cachableHttpMethods.indexOf(httpConfig.method) >= 0
var isCachable = hasConfig && isCacheableMethod