Passed
Push — master ( fa13eb...33d68f )
by Felipe Catão do
01:03
created

LavineWiki/routes/routes.js   A

Complexity

Total Complexity 5
Complexity/F 1.25

Size

Lines of Code 37
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 24
mnd 1
bc 1
fnc 4
dl 0
loc 37
rs 10
bpm 0.25
cpm 1.25
noi 1
c 0
b 0
f 0

4 Functions

Rating   Name   Duplication   Size   Complexity  
A routes.docc 0 5 1
A routes.routesCreated 0 12 2
A routes.teste 0 5 1
A routes.doc 0 3 1
1
import EngineApp from '../../Framework/engine.js'
2
import homePage from "../pages/home.js"
3
import docs from '../pages/docs.js'
4
5
var isCreate=false
6
var eng=new EngineApp()
7
8
class routes{
9
    routesCreated(){
10
        
11
        //sistemas De rotas
12
        if(isCreate==false){
0 ignored issues
show
Best Practice introduced by
Comparing isCreate to false using the == operator is not safe. Consider using === instead.
Loading history...
13
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#pageInitial",this.teste)
14
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs",this.docc)   
15
        }
16
        isCreate=true
17
        eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/index.html","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial")
18
        eng.routesEngine.whenUpdate(eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/index.html","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial"))
19
    
20
    }
21
    teste(){
22
        eng.renderEngine.pageDynamic="dinamic-Article"
23
        eng.renderEngine.clearPage()
24
        homePage()
25
    }
26
    docc(){
27
    eng.renderEngine.pageDynamic="dinamic-Article"
28
    eng.renderEngine.clearPage()
29
    docs()
30
    }
31
    doc(){
32
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#docs")
33
    }
34
}
35
36
37
export default routes
38