phadej/menrva

View on GitHub
lib/lodash.js

Summary

Maintainability
F
1 mo
Test Coverage

Function runInContext has 2277 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function runInContext(context) {
    // Avoid issues with some ES3 environments that attempt to use values, named
    // after built-in constructors like `Object`, for the creation of literals.
    // ES5 clears this up by stating that literals must use built-in constructors.
    // See http://es5.github.io/#x11.1.5.
Severity: Major
Found in lib/lodash.js - About 1 wk to fix

    File lodash.js has 2517 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license
     * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
     * Build: `lodash modern -o ./dist/lodash.js`
     * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
    Severity: Major
    Found in lib/lodash.js - About 1 wk to fix

      Function baseIsEqual has 116 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
            // used to indicate that when comparing objects, `a` has at least the properties of `b`
            if (callback) {
              var result = callback(a, b);
              if (typeof result != 'undefined') {
      Severity: Major
      Found in lib/lodash.js - About 4 hrs to fix

        Function debounce has 93 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function debounce(func, wait, options) {
              var args,
                  maxTimeoutId,
                  result,
                  stamp,
        Severity: Major
        Found in lib/lodash.js - About 3 hrs to fix

          Function baseClone has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function baseClone(value, isDeep, callback, stackA, stackB) {
                if (callback) {
                  var result = callback(value);
                  if (typeof result != 'undefined') {
                    return result;
          Severity: Major
          Found in lib/lodash.js - About 2 hrs to fix

            Function template has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function template(text, data, options) {
                  // based on John Resig's `tmpl` implementation
                  // http://ejohn.org/blog/javascript-micro-templating/
                  // and Laura Doktorova's doT.js
                  // https://github.com/olado/doT
            Severity: Major
            Found in lib/lodash.js - About 2 hrs to fix

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

                  function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
                    var isBind = bitmask & 1,
                        isBindKey = bitmask & 2,
                        isCurry = bitmask & 4,
                        isCurryBound = bitmask & 8,
              Severity: Minor
              Found in lib/lodash.js - About 1 hr to fix

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

                    function baseMerge(object, source, callback, stackA, stackB) {
                      (isArray(source) ? forEach : forOwn)(source, function(source, key) {
                        var found,
                            isArr,
                            result = source,
                Severity: Minor
                Found in lib/lodash.js - About 1 hr to fix

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

                      function intersection() {
                        var args = [],
                            argsIndex = -1,
                            argsLength = arguments.length,
                            caches = getArray(),
                  Severity: Minor
                  Found in lib/lodash.js - About 1 hr to fix

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

                        function baseCreateCallback(func, thisArg, argCount) {
                          if (typeof func != 'function') {
                            return identity;
                          }
                          // exit early for no `thisArg` or already bound by `Function#bind`
                    Severity: Minor
                    Found in lib/lodash.js - About 1 hr to fix

                      Function baseCreateWrapper has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function baseCreateWrapper(bindData) {
                            var func = bindData[0],
                                bitmask = bindData[1],
                                partialArgs = bindData[2],
                                partialRightArgs = bindData[3],
                      Severity: Minor
                      Found in lib/lodash.js - About 1 hr to fix

                        Function mixin has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function mixin(object, source, options) {
                              var chain = true,
                                  methodNames = source && functions(source);
                        
                              if (!source || (!options && !methodNames.length)) {
                        Severity: Minor
                        Found in lib/lodash.js - About 1 hr to fix

                          Function baseUniq has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function baseUniq(array, isSorted, callback) {
                                var index = -1,
                                    indexOf = getIndexOf(),
                                    length = array ? array.length : 0,
                                    result = [];
                          Severity: Minor
                          Found in lib/lodash.js - About 1 hr to fix

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

                                function sortBy(collection, callback, thisArg) {
                                  var index = -1,
                                      isArr = isArray(callback),
                                      length = collection ? collection.length : 0,
                                      result = Array(typeof length == 'number' ? length : 0);
                            Severity: Minor
                            Found in lib/lodash.js - About 1 hr to fix

                              Function min has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function min(collection, callback, thisArg) {
                                    var computed = Infinity,
                                        result = computed;
                              
                                    // allows working with functions like `_.map` without using
                              Severity: Minor
                              Found in lib/lodash.js - About 1 hr to fix

                                Function max has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function max(collection, callback, thisArg) {
                                      var computed = -Infinity,
                                          result = computed;
                                
                                      // allows working with functions like `_.map` without using
                                Severity: Minor
                                Found in lib/lodash.js - About 1 hr to fix

                                  Function random has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function random(min, max, floating) {
                                        var noMin = min == null,
                                            noMax = max == null;
                                  
                                        if (floating == null) {
                                  Severity: Minor
                                  Found in lib/lodash.js - About 1 hr to fix

                                    Function createCallback has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function createCallback(func, thisArg, argCount) {
                                          var type = typeof func;
                                          if (func == null || type == 'function') {
                                            return baseCreateCallback(func, thisArg, argCount);
                                          }
                                    Severity: Minor
                                    Found in lib/lodash.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if (ctorA != ctorB &&
                                                    !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
                                                    ('constructor' in a && 'constructor' in b)
                                                  ) {
                                                return false;
                                      Severity: Major
                                      Found in lib/lodash.js - About 1 hr to fix

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

                                            function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
                                        Severity: Minor
                                        Found in lib/lodash.js - About 45 mins to fix

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

                                              function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
                                          Severity: Minor
                                          Found in lib/lodash.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                        } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
                                                          break;
                                                        }
                                            Severity: Major
                                            Found in lib/lodash.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                            while (index--) {
                                                              if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
                                                                break;
                                                              }
                                                            }
                                              Severity: Major
                                              Found in lib/lodash.js - About 45 mins to fix

                                                Consider simplifying this complex logical expression.
                                                Open

                                                      if ((className == arrayClass || className == stringClass || className == argsClass ) ||
                                                          (className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
                                                        return !length;
                                                      }
                                                Severity: Major
                                                Found in lib/lodash.js - About 40 mins to fix

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                      if (first && typeof first == 'object' &&
                                                          mid && typeof mid == 'object' && last && typeof last == 'object') {
                                                        return false;
                                                      }
                                                  Severity: Major
                                                  Found in lib/lodash.js - About 40 mins to fix

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

                                                        function baseClone(value, isDeep, callback, stackA, stackB) {
                                                    Severity: Minor
                                                    Found in lib/lodash.js - About 35 mins to fix

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

                                                          function baseMerge(object, source, callback, stackA, stackB) {
                                                      Severity: Minor
                                                      Found in lib/lodash.js - About 35 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                    return stackB[length];
                                                        Severity: Major
                                                        Found in lib/lodash.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                    return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
                                                          Severity: Major
                                                          Found in lib/lodash.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return result;
                                                            Severity: Major
                                                            Found in lib/lodash.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                        return false;
                                                              Severity: Major
                                                              Found in lib/lodash.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                      return result;
                                                                Severity: Major
                                                                Found in lib/lodash.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                            return stackB[length] == b;
                                                                  Severity: Major
                                                                  Found in lib/lodash.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                            return false;
                                                                    Severity: Major
                                                                    Found in lib/lodash.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                return false;
                                                                      Severity: Major
                                                                      Found in lib/lodash.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                              return result;
                                                                        Severity: Major
                                                                        Found in lib/lodash.js - About 30 mins to fix

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

                                                                                if (callback == null && isArray(collection)) {
                                                                                  var index = -1,
                                                                                      length = collection.length;
                                                                          
                                                                                  while (++index < length) {
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 6 hrs to fix
                                                                          lib/lodash.js on lines 3643..3665

                                                                          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 172.

                                                                          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

                                                                                if (callback == null && isArray(collection)) {
                                                                                  var index = -1,
                                                                                      length = collection.length;
                                                                          
                                                                                  while (++index < length) {
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 6 hrs to fix
                                                                          lib/lodash.js on lines 3568..3590

                                                                          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 172.

                                                                          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

                                                                                switch (className) {
                                                                                  case boolClass:
                                                                                  case dateClass:
                                                                                    // coerce dates and booleans to numbers, dates to milliseconds and booleans
                                                                                    // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                                                                          lib/rx.lite.js on lines 247..266

                                                                          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 107.

                                                                          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

                                                                                if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {
                                                                                  var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);
                                                                                } else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {
                                                                                  callback = args[--argsLength];
                                                                                }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                                                                          lib/lodash.js on lines 2690..2694

                                                                          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 101.

                                                                          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

                                                                                if (length > 3 && typeof args[length - 2] == 'function') {
                                                                                  var callback = baseCreateCallback(args[--length - 1], args[length--], 2);
                                                                                } else if (length > 2 && typeof args[length - 1] == 'function') {
                                                                                  callback = args[--length];
                                                                                }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 3 hrs to fix
                                                                          lib/lodash.js on lines 1685..1689

                                                                          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 101.

                                                                          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 findLastKey(object, callback, thisArg) {
                                                                                var result;
                                                                                callback = lodash.createCallback(callback, thisArg, 3);
                                                                                forOwnRight(object, function(value, key, object) {
                                                                                  if (callback(value, key, object)) {
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 2 other locations - About 2 hrs to fix
                                                                          lib/lodash.js on lines 1921..1931
                                                                          lib/lodash.js on lines 3252..3262

                                                                          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

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

                                                                              function findKey(object, callback, thisArg) {
                                                                                var result;
                                                                                callback = lodash.createCallback(callback, thisArg, 3);
                                                                                forOwn(object, function(value, key, object) {
                                                                                  if (callback(value, key, object)) {
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 2 other locations - About 2 hrs to fix
                                                                          lib/lodash.js on lines 1974..1984
                                                                          lib/lodash.js on lines 3252..3262

                                                                          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

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

                                                                              function findLast(collection, callback, thisArg) {
                                                                                var result;
                                                                                callback = lodash.createCallback(callback, thisArg, 3);
                                                                                forEachRight(collection, function(value, index, collection) {
                                                                                  if (callback(value, index, collection)) {
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 2 other locations - About 2 hrs to fix
                                                                          lib/lodash.js on lines 1921..1931
                                                                          lib/lodash.js on lines 1974..1984

                                                                          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

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

                                                                                if (typeof isSorted != 'boolean' && isSorted != null) {
                                                                                  thisArg = callback;
                                                                                  callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted;
                                                                                  isSorted = false;
                                                                                }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 4364..4368

                                                                          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

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

                                                                                if (typeof isShallow != 'boolean' && isShallow != null) {
                                                                                  thisArg = callback;
                                                                                  callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow;
                                                                                  isShallow = false;
                                                                                }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 4984..4988

                                                                          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

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

                                                                              function isNumber(value) {
                                                                                return typeof value == 'number' ||
                                                                                  value && typeof value == 'object' && toString.call(value) == numberClass || false;
                                                                              }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 2559..2562

                                                                          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 56.

                                                                          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

                                                                                if (typeof callback != 'number' && callback != null) {
                                                                                  var index = length;
                                                                                  callback = lodash.createCallback(callback, thisArg, 3);
                                                                                  while (index-- && callback(array[index], index, array)) {
                                                                                    n++;
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 4594..4605

                                                                          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 56.

                                                                          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

                                                                              function isString(value) {
                                                                                return typeof value == 'string' ||
                                                                                  value && typeof value == 'object' && toString.call(value) == stringClass || false;
                                                                              }
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 2488..2491

                                                                          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 56.

                                                                          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

                                                                                  if (trailing || (maxWait !== wait)) {
                                                                                    lastCalled = now();
                                                                                    result = func.apply(thisArg, args);
                                                                                    if (!timeoutId && !maxTimeoutId) {
                                                                                      args = thisArg = null;
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 5406..5412

                                                                          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 56.

                                                                          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

                                                                                if (typeof callback != 'number' && callback != null) {
                                                                                  var index = length;
                                                                                  callback = lodash.createCallback(callback, thisArg, 3);
                                                                                  while (index-- && callback(array[index], index, array)) {
                                                                                    n++;
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 4464..4472

                                                                          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 56.

                                                                          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

                                                                                    if (isCalled) {
                                                                                      lastCalled = now();
                                                                                      result = func.apply(thisArg, args);
                                                                                      if (!timeoutId && !maxTimeoutId) {
                                                                                        args = thisArg = null;
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/lodash.js on lines 5423..5429

                                                                          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 56.

                                                                          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

                                                                                  if (result && !isWhere) {
                                                                                    // ensure both objects have the same number of properties
                                                                                    forIn(a, function(value, key, a) {
                                                                                      if (hasOwnProperty.call(a, key)) {
                                                                                        // `size` will be `-1` if `a` has more properties than `b`
                                                                          Severity: Major
                                                                          Found in lib/lodash.js and 1 other location - About 1 hr to fix
                                                                          lib/rx.lite.js on lines 338..346

                                                                          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 55.

                                                                          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

                                                                              function bind(func, thisArg) {
                                                                                return arguments.length > 2
                                                                                  ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
                                                                                  : createWrapper(func, 1, null, null, thisArg);
                                                                              }
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 50 mins to fix
                                                                          lib/lodash.js on lines 5246..5250

                                                                          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

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

                                                                              function bindKey(object, key) {
                                                                                return arguments.length > 2
                                                                                  ? createWrapper(key, 19, slice(arguments, 2), null, object)
                                                                                  : createWrapper(key, 3, null, null, object);
                                                                              }
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 50 mins to fix
                                                                          lib/lodash.js on lines 5170..5174

                                                                          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

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

                                                                              var isArray = nativeIsArray || function(value) {
                                                                                return value && typeof value == 'object' && typeof value.length == 'number' &&
                                                                                  toString.call(value) == arrayClass || false;
                                                                              };
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 50 mins to fix
                                                                          lib/lodash.js on lines 1556..1559

                                                                          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 51.

                                                                          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

                                                                              function isArguments(value) {
                                                                                return value && typeof value == 'object' && typeof value.length == 'number' &&
                                                                                  toString.call(value) == argsClass || false;
                                                                              }
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 50 mins to fix
                                                                          lib/lodash.js on lines 1578..1581

                                                                          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 51.

                                                                          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

                                                                              function isRegExp(value) {
                                                                                return value && typeof value == 'object' && toString.call(value) == regexpClass || false;
                                                                              }
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 35 mins to fix
                                                                          lib/lodash.js on lines 2243..2245

                                                                          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 46.

                                                                          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

                                                                              function isDate(value) {
                                                                                return value && typeof value == 'object' && toString.call(value) == dateClass || false;
                                                                              }
                                                                          Severity: Minor
                                                                          Found in lib/lodash.js and 1 other location - About 35 mins to fix
                                                                          lib/lodash.js on lines 2542..2544

                                                                          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 46.

                                                                          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