models/index.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 11
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 1
b 0
f 0
nc 2
mnd 1
bc 3
fnc 2
dl 0
loc 11
rs 10
bpm 1.5
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A module.exports 0 9 1
1
var fs = require('fs')
2
3
module.exports = function (app) {
4
  fs.readdirSync(__dirname).forEach(function (file) {
5
    if (file === 'index.js' || file.substr(file.lastIndexOf('.') + 1) !== 'js') {
6
      return
7
    }
8
    var name = file.substr(0, file.indexOf('.'))
9
    require('./' + name)(app)
10
  })
11
}
12