Showing 17 of 27 total issues
Function exports
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function from
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
var from = function () {
var element = this.options.element,
parent = element.nodeType === 1 ? element : document.querySelector(element),
slides = [].filter.call(parent.children, function (el) {
File umarkdown.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* micro-markdown.js
* markdown in under 5kb
*
* Copyright 2014, Simon Waldherr - http://simon.waldherr.eu/
Function from
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
var from = function () {
var element = this.options.element,
parent = element.nodeType === 1 ? element : document.querySelector(element),
slides = [].filter.call(parent.children, function (el) {
- 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
micromarkdown
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
var micromarkdown = {
regexobject: {
headline: /^(\#{1,6})([^\#\n]+)$/m,
pre: /\s\`\`\`(\w+)\n?[^`]+\`\`\`/g,
code: /\s\`\`\`\n?([^`]+)\`\`\`/g,
Function tableHandlerHelper
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
tableHandlerHelper: function (helper, calign, strict) {
var i;
for (i = 0; i < helper.length; i++) {
if (calign.length <= i) {
calign.push(0);
- 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 touchDeviceHandler
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function touchDeviceHandler() {
EchoesWorks.forEach(slides, function (slide) {
var halfWidth = window.screen.width / 3,
thirdHeight = window.screen.height / 3,
delta;
Function applyEchoes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
EchoesWorks.prototype.applyEchoes = function () {
var that = this;
var isDataValid = that.parser.data && that.parser.data.codes !== undefined && that.parser.data.codes.length > 0;
if (isDataValid) {
that.data = that.parser.data;
- 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 EchoesWorks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var EchoesWorks = function (options) {
var defaults;
defaults = {
element: 'slide',
auto: false
Function forEach
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
EchoesWorks.forEach = function (collection, callback, scope) {
if (Object.prototype.toString.call(collection) === '[object Object]') {
for (var prop in collection) {
if (Object.prototype.hasOwnProperty.call(collection, prop)) {
callback.call(scope, collection[prop], prop, collection);
- 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 listHandler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
listHandler: function (line, nstatus, status, replaceStr, helper1, casca) {
Function tableHandler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
tableHandler: function (helper1, i, calign, replaceStr, cel) {
Function defaults
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
EchoesWorks.defaults = function (obj) {
if (!EchoesWorks.isObject(obj)) {
return obj;
}
- 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 send
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
EchoesWorks.send = function (url, method, callback, data) {
data = data || null;
var request = new XMLHttpRequest();
if (callback instanceof Function) {
request.onreadystatechange = 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 extend
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
EchoesWorks.extend = function (obj) {
if (!EchoesWorks.isObject(obj)) {
return obj;
}
var source, prop;
- 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 listHandler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
listHandler: function (line, nstatus, status, replaceStr, helper1, casca) {
var indent = false;
if ((line[2] === undefined) || (line[2].length === 0)) {
nstatus = 0;
} else {
- 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 parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parse: function (str, strict) {
var helper, helper1, stra, trashgc = [], i, that = this, regexObject = micromarkdown.regexobject;
regexObject.lists = this.listStrict(strict, regexObject);
str = '\n' + str + '\n';
- 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"