erikroyall/hilo

View on GitHub
build/hilo-legacy.js

Summary

Maintainability
F
7 mos
Test Coverage

File hilo-legacy.js has 3285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// # Hilo

// `0.1.0-pre-dev-beta-10`<br/>

// Built on: 2015-05-06<br/>
Severity: Major
Found in build/hilo-legacy.js - About 1 wk to fix

    Function sizzle has 1345 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var sizzle = (function() {
    
        if (feature.qsa3 === true) {
          return;
        }
    Severity: Major
    Found in build/hilo-legacy.js - About 6 days to fix

      Function setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setDocument = Sizzle.setDocument = function(node) {
            var doc = node ? node.ownerDocument || node : preferredDoc,
              parent = doc.defaultView;
      
            // If no document and documentElement is available, return
      Severity: Major
      Found in build/hilo-legacy.js - About 1 day to fix

        Function class has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            "class": feature.classList === true ? function (action, className) {
              return this.each(function (el) {
                var _i, parts, contains, res = [];
        
                if (typeof className === "string") { // A String
        Severity: Major
        Found in build/hilo-legacy.js - About 4 hrs to fix

          Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function Sizzle(selector, context, results, seed) {
                var match, elem, m, nodeType,
                  // QSA vars
                  i, groups, old, nid, newContext, newSelector;
          
          
          Severity: Major
          Found in build/hilo-legacy.js - About 3 hrs to fix

            Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function matcherFromGroupMatchers(elementMatchers, setMatchers) {
                  // A counter to specify which element is currently being matched
                  var matcherCachedRuns = 0,
                    bySet = setMatchers.length > 0,
                    byElement = elementMatchers.length > 0,
            Severity: Major
            Found in build/hilo-legacy.js - About 2 hrs to fix

              Function classify has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              hilo.classify = function () {
                  var body = win.Hilo("body")
                    , classes = ["js"]
                    , _i;
                  // Remove the default no-js class
              Severity: Major
              Found in build/hilo-legacy.js - About 2 hrs to fix

                Function str has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function str(key, holder) {
                
                      // Produce a string from holder[key].
                
                      var i,          // The loop counter.
                Severity: Major
                Found in build/hilo-legacy.js - About 2 hrs to fix

                  Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                        if (postFilter && !postFilter[expando]) {
                          postFilter = setMatcher(postFilter);
                        }
                        if (postFinder && !postFinder[expando]) {
                  Severity: Major
                  Found in build/hilo-legacy.js - About 2 hrs to fix

                    Function superMatcher has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            superMatcher = function(seed, context, xml, results, expandContext) {
                              var elem, j, matcher,
                                setMatched = [],
                                matchedCount = 0,
                                i = "0",
                    Severity: Major
                    Found in build/hilo-legacy.js - About 2 hrs to fix

                      Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              "CHILD": function(type, what, argument, first, last) {
                                var simple = type.slice(0, 3) !== "nth",
                                  forward = type.slice(-4) !== "last",
                                  ofType = what === "of-type";
                      
                      
                      Severity: Major
                      Found in build/hilo-legacy.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if (forward && useCache) {
                                          // Seek `elem` from a previously-cached index
                                          outerCache = parent[expando] || (parent[expando] = {});
                                          cache = outerCache[type] || [];
                                          nodeIndex = cache[0] === dirruns && cache[1];
                        Severity: Critical
                        Found in build/hilo-legacy.js - About 2 hrs to fix

                          Function select has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function select(selector, context, results, seed) {
                                var i, tokens, token, type, find,
                                  match = tokenize(selector);
                          
                                if (!seed) {
                          Severity: Minor
                          Found in build/hilo-legacy.js - About 1 hr to fix

                            Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function tokenize(selector, parseOnly) {
                                  var matched, match, tokens, type,
                                    soFar, groups, preFilters,
                                    cached = tokenCache[selector + " "];
                            
                            
                            Severity: Minor
                            Found in build/hilo-legacy.js - About 1 hr to fix

                              Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function matcherFromTokens(tokens) {
                                    var checkContext, matcher, j,
                                      len = tokens.length,
                                      leadingRelative = Expr.relative[tokens[0].type],
                                      implicitRelative = leadingRelative || Expr.relative[" "],
                              Severity: Minor
                              Found in build/hilo-legacy.js - About 1 hr to fix

                                Function unitize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function unitize (unit, prop) {
                                
                                    /* All the CSS props. that are to be defaulted to px values */
                                    var pixel = {
                                      "width": true,
                                Severity: Minor
                                Found in build/hilo-legacy.js - About 1 hr to fix

                                  Function addCombinator has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function addCombinator(matcher, combinator, base) {
                                        var dir = combinator.dir,
                                          checkNonElements = base && dir === "parentNode",
                                          doneName = done++;
                                  
                                  
                                  Severity: Minor
                                  Found in build/hilo-legacy.js - About 1 hr to fix

                                    Function fade has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        fade: function (inOut, timing) {
                                          if (inOut === "in") {
                                            this.show();
                                          }
                                    
                                    
                                    Severity: Minor
                                    Found in build/hilo-legacy.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                      } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
                                                        diff = cache[1];
                                      
                                                      // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                                                      } else {
                                      Severity: Critical
                                      Found in build/hilo-legacy.js - About 1 hr to fix

                                        Function parse has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              json.parse = function (text, reviver) {
                                        
                                                // The parse method takes a text and an optional reviver function, and returns
                                                // a JavaScript value if the text is a valid json text.
                                        
                                        
                                        Severity: Minor
                                        Found in build/hilo-legacy.js - About 1 hr to fix

                                          Function fire has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              fire: (function () {
                                                if (document.dispatchEvent) {
                                                  return function (event) {
                                                    var evt;
                                                    
                                          Severity: Minor
                                          Found in build/hilo-legacy.js - About 1 hr to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                      if (tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                          support.getById && context.nodeType === 9 && documentIsHTML &&
                                                          Expr.relative[tokens[1].type]) {
                                            
                                                        context = (Expr.find["ID"](token.matches[0].replace(runescape, 
                                            Severity: Major
                                            Found in build/hilo-legacy.js - About 1 hr to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                            if ((seed = find(
                                                              token.matches[0].replace(runescape, funescape),
                                                              rsibling.test(tokens[0].type) && context.parentNode || context
                                                           ))) {
                                              
                                              
                                              Severity: Major
                                              Found in build/hilo-legacy.js - About 45 mins to fix

                                                Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                                                Severity: Minor
                                                Found in build/hilo-legacy.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                if (elem && elem.parentNode) {
                                                                  // Handle the case where IE, Opera, and Webkit return items
                                                                  // by name instead of ID
                                                                  if (elem.id === m) {
                                                                    results.push(elem);
                                                  Severity: Major
                                                  Found in build/hilo-legacy.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                    if (v !== undefined) {
                                                                      value[k] = v;
                                                                    } else {
                                                                      delete value[k];
                                                                    }
                                                    Severity: Major
                                                    Found in build/hilo-legacy.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                    if (v) {
                                                                      partial.push(quote(k) + (gap ? ": " : ":") + v);
                                                                    }
                                                      Severity: Major
                                                      Found in build/hilo-legacy.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                      if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) &&
                                                                        contains(context, elem) && elem.id === m) {
                                                                        results.push(elem);
                                                                        return results;
                                                                      }
                                                        Severity: Major
                                                        Found in build/hilo-legacy.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                              if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
                                                                                // Cache the index of each encountered element
                                                                                if (useCache) {
                                                                                  (node[expando] || (node[expando] = {}))[type] = [dirruns, diff];
                                                                                }
                                                          Severity: Major
                                                          Found in build/hilo-legacy.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                  if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
                                                                                    return false;
                                                                                  }
                                                            Severity: Major
                                                            Found in build/hilo-legacy.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                            if (v) {
                                                                              partial.push(quote(k) + (gap ? ": " : ":") + v);
                                                                            }
                                                              Severity: Major
                                                              Found in build/hilo-legacy.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                  if ((data = cache[1]) === true || data === cachedruns) {
                                                                                    return data === true;
                                                                                  }
                                                                Severity: Major
                                                                Found in build/hilo-legacy.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                  if (contains(parts[_i])) {
                                                                                    el.className.replace(parts[_i], "");
                                                                                  }
                                                                  Severity: Major
                                                                  Found in build/hilo-legacy.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                      if (!(unmatched[i] || setMatched[i])) {
                                                                                        setMatched[i] = pop.call(results);
                                                                                      }
                                                                    Severity: Major
                                                                    Found in build/hilo-legacy.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                        if (!contains(parts[_i])) {
                                                                                          el.classList.add(parts[_i]);
                                                                                        }
                                                                      Severity: Major
                                                                      Found in build/hilo-legacy.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                          if (contains(parts[_i])) {
                                                                                            el.classList.remove(parts[_i]);
                                                                                          } else {
                                                                                            el.classList.add(parts[_i]);
                                                                                          }
                                                                        Severity: Major
                                                                        Found in build/hilo-legacy.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                          if ((elem = matcherOut[i])) {
                                                                                            // Restore matcherIn since elem is not yet a final match
                                                                                            temp.push((matcherIn[i] = elem));
                                                                                          }
                                                                          Severity: Major
                                                                          Found in build/hilo-legacy.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                              if (contains) {
                                                                                                el.className.replace(className, "");
                                                                                              } else {
                                                                                                el.className += " " +  className;
                                                                                              }
                                                                            Severity: Major
                                                                            Found in build/hilo-legacy.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                              if (!contains(parts[_i])) {
                                                                                                el.classList.add(parts[_i]);
                                                                                              }
                                                                              Severity: Major
                                                                              Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                if (contains(parts[_i])) {
                                                                                                  el.className.replace(parts[_i], "");
                                                                                                } else {
                                                                                                  el.className += " " +  parts[_i];
                                                                                                }
                                                                                Severity: Major
                                                                                Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                    if (contains) {
                                                                                                      el.classList.remove(parts[_i]);
                                                                                                    } else {
                                                                                                      el.classList.add(parts[_i]);
                                                                                                    }
                                                                                  Severity: Major
                                                                                  Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                      if (contains(parts[_i])) {
                                                                                                        el.classList.remove(parts[_i]);
                                                                                                      }
                                                                                    Severity: Major
                                                                                    Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                        if (!contains(parts[_i])) {
                                                                                                          el.className += " " +  parts[_i];
                                                                                                        }
                                                                                      Severity: Major
                                                                                      Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                          if (contains(parts[_i])) {
                                                                                                            el.className.replace(parts[_i], "");
                                                                                                          } else {
                                                                                                            el.className += " " +  parts[_i];
                                                                                                          }
                                                                                        Severity: Major
                                                                                        Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                          if (!contains(parts[_i])) {
                                                                                                            el.className += " " +  parts[_i];
                                                                                                          }
                                                                                          Severity: Major
                                                                                          Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                              if (cache[1] === true) {
                                                                                                                return true;
                                                                                                              }
                                                                                            Severity: Major
                                                                                            Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                              if (contains(parts[_i])) {
                                                                                                                el.classList.remove(parts[_i]);
                                                                                                              } else {
                                                                                                                el.classList.add(parts[_i]);
                                                                                                              }
                                                                                              Severity: Major
                                                                                              Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                  if (contains(parts[_i])) {
                                                                                                                    el.className.replace(parts[_i], "");
                                                                                                                  }
                                                                                                Severity: Major
                                                                                                Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                if (Expr.relative[tokens[j].type]) {
                                                                                                                  break;
                                                                                                                }
                                                                                                  Severity: Major
                                                                                                  Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                    if (contains(parts[_i])) {
                                                                                                                      el.classList.remove(parts[_i]);
                                                                                                                    }
                                                                                                    Severity: Major
                                                                                                    Found in build/hilo-legacy.js - About 45 mins to fix

                                                                                                      Consider simplifying this complex logical expression.
                                                                                                      Open

                                                                                                                if (matcher[expando]) {
                                                                                                                  // Find the next relative operator (if any) for proper handling
                                                                                                                  j = ++i;
                                                                                                                  for (; j < len; j++) {
                                                                                                                    if (Expr.relative[tokens[j].type]) {
                                                                                                      Severity: Major
                                                                                                      Found in build/hilo-legacy.js - About 40 mins to fix

                                                                                                        Consider simplifying this complex logical expression.
                                                                                                        Open

                                                                                                              if (support.matchesSelector && documentIsHTML &&
                                                                                                                (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
                                                                                                                (!rbuggyQSA     || !rbuggyQSA.test(expr))) {
                                                                                                        
                                                                                                                try {
                                                                                                        Severity: Major
                                                                                                        Found in build/hilo-legacy.js - About 40 mins to fix

                                                                                                          Function CHILD has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                  "CHILD": function(type, what, argument, first, last) {
                                                                                                          Severity: Minor
                                                                                                          Found in build/hilo-legacy.js - About 35 mins to fix

                                                                                                            Function condense has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                function condense(unmatched, map, filter, context, xml) {
                                                                                                            Severity: Minor
                                                                                                            Found in build/hilo-legacy.js - About 35 mins to fix

                                                                                                              Function superMatcher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                      superMatcher = function(seed, context, xml, results, expandContext) {
                                                                                                              Severity: Minor
                                                                                                              Found in build/hilo-legacy.js - About 35 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                          return compare & 4 ? -1 : 1;
                                                                                                                Severity: Major
                                                                                                                Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                        return new Dom(input);
                                                                                                                  Severity: Major
                                                                                                                  Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                                  return results;
                                                                                                                    Severity: Major
                                                                                                                    Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                                return false;
                                                                                                                      Severity: Major
                                                                                                                      Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                    return results;
                                                                                                                        Severity: Major
                                                                                                                        Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                return new Dom(input);
                                                                                                                          Severity: Major
                                                                                                                          Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                            return results;
                                                                                                                            Severity: Major
                                                                                                                            Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                    return select(selector.replace(rtrim, "$1"), context, results, seed);
                                                                                                                              Severity: Major
                                                                                                                              Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                            return results;
                                                                                                                                Severity: Major
                                                                                                                                Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                          return a.compareDocumentPosition ? -1 : 1;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                    Open

                                                                                                                                          return win.Hilo;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in build/hilo-legacy.js - About 30 mins to fix

                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var sizzle = (function() {
                                                                                                                                      
                                                                                                                                          if (feature.qsa3 === true) {
                                                                                                                                            return;
                                                                                                                                          }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 3 mos to fix
                                                                                                                                      src/sizzle.js on lines 4..2021

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 14143.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(Dom.prototype, {
                                                                                                                                      
                                                                                                                                          // ## Helper Functions
                                                                                                                                      
                                                                                                                                          // 
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 3 wks to fix
                                                                                                                                      build/hilo.js on lines 1933..2849

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 4231.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        feature = (function () {
                                                                                                                                          var c = function (tagName) {
                                                                                                                                              return doc.createElement(tagName);
                                                                                                                                            }
                                                                                                                                            , i = c("input")
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 wks to fix
                                                                                                                                      build/hilo.js on lines 76..509
                                                                                                                                      src/detect.js on lines 3..436

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 2539.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        (function () {
                                                                                                                                      
                                                                                                                                          if (typeof window.JSON === "object" && typeof window.JSON.parse === "function") {
                                                                                                                                            json = window.JSON;
                                                                                                                                            
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 1 wk to fix
                                                                                                                                      build/hilo.js on lines 749..1071
                                                                                                                                      src/polyfill.js on lines 17..339

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 1879.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        detected = (function () {
                                                                                                                                          var engine
                                                                                                                                            , browser
                                                                                                                                            , system
                                                                                                                                            , ua = win.navigator.userAgent
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 1 wk to fix
                                                                                                                                      build/hilo.js on lines 513..732

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 1839.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      hilo.classify = function () {
                                                                                                                                          var body = win.Hilo("body")
                                                                                                                                            , classes = ["js"]
                                                                                                                                            , _i;
                                                                                                                                          // Remove the default no-js class
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 4 days to fix
                                                                                                                                      build/hilo.js on lines 3422..3510

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 832.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(Dom.prototype, {
                                                                                                                                      
                                                                                                                                          /**
                                                                                                                                           * Sets the display property of sel.els. to "" or given value
                                                                                                                                           * 
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 4 days to fix
                                                                                                                                      build/hilo.js on lines 3189..3421
                                                                                                                                      src/fx.js on lines 6..238

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 825.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        hiloAjax = function (config) {
                                                                                                                                          
                                                                                                                                          // ```
                                                                                                                                          // config.
                                                                                                                                          //  method // HTTP Method (default: "POST")
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 4 days to fix
                                                                                                                                      build/hilo.js on lines 1543..1642
                                                                                                                                      src/ajax.js on lines 25..124

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 741.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(Dom.prototype, {
                                                                                                                                      
                                                                                                                                          // Listen to an event and execute a function when that event happend
                                                                                                                                      
                                                                                                                                          /**
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 3 days to fix
                                                                                                                                      build/hilo.js on lines 2855..2990
                                                                                                                                      src/evt.js on lines 6..141

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 618.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        key = {
                                                                                                                                      
                                                                                                                                          // Numbers
                                                                                                                                      
                                                                                                                                          "0": 48,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 3 days to fix
                                                                                                                                      build/hilo.js on lines 3055..3181
                                                                                                                                      src/evt.js on lines 206..332

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 527.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(NumberObject.prototype, {
                                                                                                                                          
                                                                                                                                          /**
                                                                                                                                           * NumberObject.MAX_INTEGER = 9007199254740991
                                                                                                                                           * The maximum value of a JavaScript integer
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 2 days to fix
                                                                                                                                      build/hilo.js on lines 3535..3709

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 406.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        function unitize (unit, prop) {
                                                                                                                                      
                                                                                                                                          /* All the CSS props. that are to be defaulted to px values */
                                                                                                                                          var pixel = {
                                                                                                                                            "width": true,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 1 day to fix
                                                                                                                                      build/hilo.js on lines 1828..1887
                                                                                                                                      src/dom.js on lines 91..150

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 274.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(Test.prototype, {
                                                                                                                                      
                                                                                                                                          /**
                                                                                                                                           * Test if equal
                                                                                                                                           *
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 1 day to fix
                                                                                                                                      build/hilo.js on lines 1461..1518

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 232.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        hilo = function (input, root, en) {
                                                                                                                                          if (typeof input === "undefined") {
                                                                                                                                            // It's better than not returning anything
                                                                                                                                            return win.Hilo;
                                                                                                                                          } else if (typeof input === "number") {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 1 day to fix
                                                                                                                                      build/hilo.js on lines 1335..1365
                                                                                                                                      src/core.js on lines 25..55

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 230.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var indexOf = function indexOf(arr, sought /*, fromIndex */ ) {
                                                                                                                                          var self = splitString && arr.toString() === "[object String]" ?
                                                                                                                                                  this.split("") :
                                                                                                                                                  toObject(this)
                                                                                                                                            , length = self.length >>> 0;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 1 day to fix
                                                                                                                                      src/util.js on lines 212..238

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 204.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        hilo.create = function (tagName, attrs) {
                                                                                                                                          var el = new Dom([document.createElement(tagName)]), key;
                                                                                                                                      
                                                                                                                                          if (attrs) {
                                                                                                                                            /* Add Class if the `className` is set */
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 7 hrs to fix
                                                                                                                                      build/hilo.js on lines 1906..1931
                                                                                                                                      src/dom.js on lines 169..194

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 190.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var every = function every (o, fun) {
                                                                                                                                          var t, len, thisp, _i;
                                                                                                                                      
                                                                                                                                          if (o === null) {
                                                                                                                                            throw new TypeError();
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 6 hrs to fix
                                                                                                                                      build/hilo.js on lines 1230..1253
                                                                                                                                      src/util.js on lines 158..181

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 169.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var each = function each (arr, fn, thisRef) {
                                                                                                                                          var _i, _l;
                                                                                                                                      
                                                                                                                                          // Use Array.prototype.forEach if available
                                                                                                                                          if (Array.prototype.forEach) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 6 hrs to fix
                                                                                                                                      build/hilo.js on lines 1164..1185
                                                                                                                                      src/util.js on lines 92..113

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 162.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        (function () {
                                                                                                                                          var evtObj = {}
                                                                                                                                            , impEvts;
                                                                                                                                      
                                                                                                                                          impEvts = [
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 6 hrs to fix
                                                                                                                                      build/hilo.js on lines 3008..3050
                                                                                                                                      src/evt.js on lines 159..201

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 161.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var trim = function trim (str) {
                                                                                                                                          var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + 
                                                                                                                                                   "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + 
                                                                                                                                                   "\u2029\uFEFF";
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 5 hrs to fix
                                                                                                                                      build/hilo.js on lines 1260..1275
                                                                                                                                      src/util.js on lines 188..203

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 153.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var toPrimitive = function toPrimitive (input) {
                                                                                                                                          var val, valueOf, toString;
                                                                                                                                      
                                                                                                                                          if (isPrimitive(input)) {
                                                                                                                                            return input;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 5 hrs to fix
                                                                                                                                      build/hilo.js on lines 1115..1142
                                                                                                                                      src/util.js on lines 43..70

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 152.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        function ajaxRequest (method, strOpt, callback, oOpt) {
                                                                                                                                      
                                                                                                                                          oOpt = (typeof oOpt === "object" ? oOpt : undefined);
                                                                                                                                          
                                                                                                                                          if (typeof strOpt === "string" && typeof callback === "function") {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 5 hrs to fix
                                                                                                                                      build/hilo.js on lines 1657..1672
                                                                                                                                      src/ajax.js on lines 139..154

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 146.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        function Dom (els, sel) {
                                                                                                                                          var _i, _l;
                                                                                                                                      
                                                                                                                                          /* Note that `this` is an object and NOT an Array */
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 5 hrs to fix
                                                                                                                                      build/hilo.js on lines 1764..1779
                                                                                                                                      src/dom.js on lines 27..42

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 135.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var hilo             /* Public API */
                                                                                                                                      
                                                                                                                                          /* Used to measure performace (Hilo.perf) */
                                                                                                                                          , start
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 4 hrs to fix
                                                                                                                                      build/hilo.js on lines 37..70

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 128.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      (function (A, M, D) {
                                                                                                                                      
                                                                                                                                        /* Register Hilo as an AMD module */
                                                                                                                                      
                                                                                                                                        /*globals YUI: false, module: false, define: false*/
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 4 hrs to fix
                                                                                                                                      build/hilo.js on lines 11..3733

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 118.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var forIn = function forIn (obj, fn, thisRef) {
                                                                                                                                          var _i;
                                                                                                                                      
                                                                                                                                          // Throw an error if object and function are not provided
                                                                                                                                          if (!(obj && fn)) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 3 hrs to fix
                                                                                                                                      build/hilo.js on lines 1189..1207
                                                                                                                                      src/util.js on lines 117..135

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 99.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var toInteger = function toInteger (value) {
                                                                                                                                          var number = +value;
                                                                                                                                      
                                                                                                                                          if (Number.isNaN(number)) {
                                                                                                                                            return 0;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1089..1101
                                                                                                                                      src/util.js on lines 17..29

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 93.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var extend = function extend (obj, ext) {
                                                                                                                                          var _i;
                                                                                                                                      
                                                                                                                                          // Throw an error if object and extension are not provided
                                                                                                                                          if (!(obj && ext)) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1210..1227
                                                                                                                                      src/util.js on lines 138..155

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 88.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        hilo.get = function (strOpt, callback, oOpt) {
                                                                                                                                          ajaxRequest("GET", strOpt, callback, oOpt);
                                                                                                                                        };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1705..1707
                                                                                                                                      src/ajax.js on lines 187..189

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 87.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        hilo.post = function (strOpt, callback, oOpt) {
                                                                                                                                          ajaxRequest("POST", strOpt, callback, oOpt);
                                                                                                                                        };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1735..1737

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 82.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(Dom.prototype, {
                                                                                                                                          ready: function (fn) {
                                                                                                                                            this.each(function (el) {
                                                                                                                                              el.onreadystatechange = function () {
                                                                                                                                                if (el.readyState = "complete") {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 2996..3006
                                                                                                                                      src/evt.js on lines 147..157

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 82.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        function unhyph (prop) {
                                                                                                                                          return prop.toLowerCase().replace(/-(.)/g, function (m, m1) {
                                                                                                                                            return m1.toUpperCase();
                                                                                                                                          });
                                                                                                                                        }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1806..1810
                                                                                                                                      src/dom.js on lines 69..73

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 79.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var sign = function sign(value) {
                                                                                                                                          var number = +value;
                                                                                                                                      
                                                                                                                                          if (number === 0) {
                                                                                                                                            return number;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 2 hrs to fix
                                                                                                                                      build/hilo.js on lines 1144..1156
                                                                                                                                      src/util.js on lines 72..84

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 77.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        doc.onreadystatechange = function () {
                                                                                                                                          if (doc.readyState === "complete") {
                                                                                                                                            for (_i = 0; _i < callbacks.length; _i += 1) {
                                                                                                                                              callbacks[_i]();
                                                                                                                                            }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 1 hr to fix
                                                                                                                                      build/hilo.js on lines 3720..3726

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 72.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        extend(hilo, {
                                                                                                                                          each: each,
                                                                                                                                          extend: extend,
                                                                                                                                          every: every,
                                                                                                                                          trim: trim,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 1 hr to fix
                                                                                                                                      build/hilo.js on lines 1380..1391
                                                                                                                                      src/core.js on lines 70..81

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 63.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var isPrimitive = function isPrimitive(input) {
                                                                                                                                          var type = typeof input;
                                                                                                                                          
                                                                                                                                          return (
                                                                                                                                            input === null ||
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 1 hr to fix
                                                                                                                                      build/hilo.js on lines 1103..1113
                                                                                                                                      src/util.js on lines 31..41

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 63.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        select = feature.qsa3 ? function (selector, root) {
                                                                                                                                          // Set root to given root or document
                                                                                                                                          root = root || doc;
                                                                                                                                      
                                                                                                                                          return root.querySelectorAll(selector);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 1 other location - About 1 hr to fix
                                                                                                                                      src/legacy.js on lines 2..9

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 62.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        select = select || function (selector, root) {
                                                                                                                                      
                                                                                                                                          // Set root to given root or document
                                                                                                                                          root = root || doc;
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 55 mins to fix
                                                                                                                                      build/hilo.js on lines 1318..1325
                                                                                                                                      src/core.js on lines 8..15

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 54.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var toObject = function toObject (o) {
                                                                                                                                          if (typeof o === "undefined") { // this matches both null and undefined
                                                                                                                                            throw new TypeError("can't convert "+o+" to object");
                                                                                                                                          }
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Major
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 50 mins to fix
                                                                                                                                      build/hilo.js on lines 1081..1087
                                                                                                                                      src/util.js on lines 9..15

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 52.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        var contains = function contains (haystack, needle) {
                                                                                                                                          var position = arguments[1];
                                                                                                                                      
                                                                                                                                          return haystack.indexOf(needle, position) !== -1;
                                                                                                                                        };
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 35 mins to fix
                                                                                                                                      build/hilo.js on lines 1278..1282
                                                                                                                                      src/util.js on lines 206..210

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 47.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                      Open

                                                                                                                                        function Test (con, neg) {
                                                                                                                                          this.con = con;
                                                                                                                                          
                                                                                                                                          if (neg) {
                                                                                                                                            this.neg = true;
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in build/hilo-legacy.js and 2 other locations - About 30 mins to fix
                                                                                                                                      build/hilo.js on lines 1449..1455
                                                                                                                                      src/test.js on lines 49..55

                                                                                                                                      Duplicated Code

                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                      Tuning

                                                                                                                                      This issue has a mass of 45.

                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                      Refactorings

                                                                                                                                      Further Reading

                                                                                                                                      There are no issues that match your filters.

                                                                                                                                      Category
                                                                                                                                      Status