Passed
Push — master ( db8b6d...8ae6ad )
by Lucas
02:30
created

T_IF   A

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 1
Function Count 3

Duplication

Duplicated Lines 1
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 2
dl 1
loc 1
rs 10
c 0
b 0
f 0
wmc 4
mnd 1
bc 5
fnc 3
bpm 1.6666
cpm 1.3333
noi 0

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 View Code Duplication
if (typeof Object.create === 'function') {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
  // implementation from standard node.js 'util' module
3
  module.exports = function inherits(ctor, superCtor) {
4
    ctor.super_ = superCtor
5
    ctor.prototype = Object.create(superCtor.prototype, {
6
      constructor: {
7
        value: ctor,
8
        enumerable: false,
9
        writable: true,
10
        configurable: true
11
      }
12
    });
13
  };
14
} else {
15
  // old school shim for old browsers
16
  module.exports = function inherits(ctor, superCtor) {
17
    ctor.super_ = superCtor
18
    var TempCtor = function () {}
19
    TempCtor.prototype = superCtor.prototype
20
    ctor.prototype = new TempCtor()
21
    ctor.prototype.constructor = ctor
22
  }
23
}
24