pat310/quick-pivot

View on GitHub

Showing 119 of 119 total issues

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

      { value: [
        'Cersei',
        '',
        [ { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 } ],
        '',
Severity: Major
Found in test/index/collapse.js and 4 other locations - About 30 mins to fix
test/index/expand.js on lines 130..137
test/index/expandAll.js on lines 40..40
test/index/expandAll.js on lines 45..45
test/index/getData.js on lines 42..49

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

      { value: [
        'Arya',
        [ { name: 'Arya', gender: 'f', house: 'Stark', age: 10 } ],
        '',
        '',
Severity: Major
Found in test/index/collapse.js and 9 other locations - About 30 mins to fix
test/index/collapse.js on lines 93..100
test/index/expand.js on lines 114..121
test/index/expand.js on lines 138..145
test/index/expandAll.js on lines 39..39
test/index/expandAll.js on lines 41..41
test/index/expandAll.js on lines 43..43
test/index/expandAll.js on lines 46..46
test/index/getData.js on lines 34..41
test/index/getData.js on lines 50..57

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    it('average', () => {
      const accumulatedResults = accumulator(data, 'age', 'average');

      expect(accumulatedResults).to.equal(28.75);
    });
Severity: Major
Found in test/logic/accumulator.js and 5 other locations - About 30 mins to fix
test/logic/accumulator.js on lines 22..26
test/logic/accumulator.js on lines 27..31
test/logic/accumulator.js on lines 32..36
test/logic/accumulator.js on lines 37..41
test/logic/accumulator.js on lines 42..46

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    it('min', () => {
      const accumulatedResults = accumulator(data, 'age', 'min');

      expect(accumulatedResults).to.equal(28);
    });
Severity: Major
Found in test/logic/accumulator.js and 5 other locations - About 30 mins to fix
test/logic/accumulator.js on lines 17..21
test/logic/accumulator.js on lines 22..26
test/logic/accumulator.js on lines 32..36
test/logic/accumulator.js on lines 37..41
test/logic/accumulator.js on lines 42..46

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    it('max', () => {
      const accumulatedResults = accumulator(data, 'age', 'max');

      expect(accumulatedResults).to.equal(30);
    });
Severity: Major
Found in test/logic/accumulator.js and 5 other locations - About 30 mins to fix
test/logic/accumulator.js on lines 17..21
test/logic/accumulator.js on lines 22..26
test/logic/accumulator.js on lines 27..31
test/logic/accumulator.js on lines 37..41
test/logic/accumulator.js on lines 42..46

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

  { value: ['Arya', [{ name: 'Arya', gender: 'f', house: 'Stark', age: 10 }], '', ''], type: 'data', depth: 1 },
Severity: Major
Found in test/index/expandAll.js and 9 other locations - About 30 mins to fix
test/index/collapse.js on lines 77..84
test/index/collapse.js on lines 93..100
test/index/expand.js on lines 114..121
test/index/expand.js on lines 138..145
test/index/expandAll.js on lines 41..41
test/index/expandAll.js on lines 43..43
test/index/expandAll.js on lines 46..46
test/index/getData.js on lines 34..41
test/index/getData.js on lines 50..57

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

  { value: ['Bran', [{ name: 'Bran', gender: 'm', house: 'Stark', age: 8 }], '', ''], type: 'data', depth: 1 },
Severity: Major
Found in test/index/expandAll.js and 9 other locations - About 30 mins to fix
test/index/collapse.js on lines 77..84
test/index/collapse.js on lines 93..100
test/index/expand.js on lines 114..121
test/index/expand.js on lines 138..145
test/index/expandAll.js on lines 39..39
test/index/expandAll.js on lines 41..41
test/index/expandAll.js on lines 46..46
test/index/getData.js on lines 34..41
test/index/getData.js on lines 50..57

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

      { value: [
        'Tyrion',
        '',
        '',
        [ { name: 'Tyrion', gender: 'm', house: 'Lannister', age: 34 } ],
Severity: Major
Found in test/index/expand.js and 5 other locations - About 30 mins to fix
test/index/expand.js on lines 122..129
test/index/expand.js on lines 154..161
test/index/expandAll.js on lines 44..44
test/index/expandAll.js on lines 47..47
test/index/expandAll.js on lines 48..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

  { value: ['Jaime', '', '', [{ name: 'Jaime', gender: 'm', house: 'Lannister', age: 32 }]], type: 'data', depth: 1 },
Severity: Major
Found in test/index/expandAll.js and 5 other locations - About 30 mins to fix
test/index/expand.js on lines 122..129
test/index/expand.js on lines 146..153
test/index/expand.js on lines 154..161
test/index/expandAll.js on lines 47..47
test/index/expandAll.js on lines 48..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

  { value: ['Tywin', '', '', [{ name: 'Tywin', gender: 'm', house: 'Lannister', age: 67 }]], type: 'data', depth: 1 },
Severity: Major
Found in test/index/expandAll.js and 5 other locations - About 30 mins to fix
test/index/expand.js on lines 122..129
test/index/expand.js on lines 146..153
test/index/expand.js on lines 154..161
test/index/expandAll.js on lines 44..44
test/index/expandAll.js on lines 47..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    it('default', () => {
      const accumulatedResults = accumulator(data, 'age', 'default');

      expect(accumulatedResults).to.equal(8);
    });
Severity: Major
Found in test/logic/accumulator.js and 5 other locations - About 30 mins to fix
test/logic/accumulator.js on lines 17..21
test/logic/accumulator.js on lines 22..26
test/logic/accumulator.js on lines 27..31
test/logic/accumulator.js on lines 32..36
test/logic/accumulator.js on lines 37..41

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    pivot.filter('name', ['Cersei'], 'exclude')
      .filter('name', ['Jaime'], 'exclude')
      .collapse(1)
      .filter('name', ['Tywin'], 'exclude')
Severity: Minor
Found in test/index/filter.js and 1 other location - About 30 mins to fix
test/index/filter.js on lines 286..289

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

  { value: ['Cersei', '', [{ name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 }], ''], type: 'data', depth: 1 },
Severity: Major
Found in test/index/expandAll.js and 4 other locations - About 30 mins to fix
test/index/collapse.js on lines 85..92
test/index/expand.js on lines 130..137
test/index/expandAll.js on lines 45..45
test/index/getData.js on lines 42..49

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

Avoid too many return statements within this function.
Open

        return acc;
Severity: Major
Found in src/logic.js - About 30 mins to fix

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

        it('sum', () => {
          const accumulatedResults = accumulator(data, 'age', 'sum');
    
          expect(accumulatedResults).to.equal(230);
        });
    Severity: Major
    Found in test/logic/accumulator.js and 5 other locations - About 30 mins to fix
    test/logic/accumulator.js on lines 17..21
    test/logic/accumulator.js on lines 22..26
    test/logic/accumulator.js on lines 27..31
    test/logic/accumulator.js on lines 32..36
    test/logic/accumulator.js on lines 42..46

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

      { value: ['Jon', [{ name: 'Jon', gender: 'm', house: 'Stark', age: 14 }], '', ''], type: 'data', depth: 1 },
    Severity: Major
    Found in test/index/expandAll.js and 9 other locations - About 30 mins to fix
    test/index/collapse.js on lines 77..84
    test/index/collapse.js on lines 93..100
    test/index/expand.js on lines 114..121
    test/index/expand.js on lines 138..145
    test/index/expandAll.js on lines 39..39
    test/index/expandAll.js on lines 41..41
    test/index/expandAll.js on lines 43..43
    test/index/getData.js on lines 34..41
    test/index/getData.js on lines 50..57

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

          { value: [
            'Jon',
            [ { name: 'Jon', gender: 'm', house: 'Stark', age: 14 } ],
            '',
            '',
    Severity: Major
    Found in test/index/expand.js and 9 other locations - About 30 mins to fix
    test/index/collapse.js on lines 77..84
    test/index/collapse.js on lines 93..100
    test/index/expand.js on lines 114..121
    test/index/expandAll.js on lines 39..39
    test/index/expandAll.js on lines 41..41
    test/index/expandAll.js on lines 43..43
    test/index/expandAll.js on lines 46..46
    test/index/getData.js on lines 34..41
    test/index/getData.js on lines 50..57

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

    Avoid too many return statements within this function.
    Open

            return acc;
    Severity: Major
    Found in src/logic.js - About 30 mins to fix

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

        { value: ['Sansa', [{ name: 'Sansa', gender: 'f', house: 'Stark', age: 12 }], '', ''], type: 'data', depth: 1 },
      Severity: Major
      Found in test/index/expandAll.js and 9 other locations - About 30 mins to fix
      test/index/collapse.js on lines 77..84
      test/index/collapse.js on lines 93..100
      test/index/expand.js on lines 114..121
      test/index/expand.js on lines 138..145
      test/index/expandAll.js on lines 39..39
      test/index/expandAll.js on lines 43..43
      test/index/expandAll.js on lines 46..46
      test/index/getData.js on lines 34..41
      test/index/getData.js on lines 50..57

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

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

            { value: [
              'Cersei',
              '',
              [ { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 } ],
              '',
      Severity: Major
      Found in test/index/getData.js and 4 other locations - About 30 mins to fix
      test/index/collapse.js on lines 85..92
      test/index/expand.js on lines 130..137
      test/index/expandAll.js on lines 40..40
      test/index/expandAll.js on lines 45..45

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language