Passed
Push — master ( f28044...8bf019 )
by Felipe Catão do
01:08
created

articlefrag.js ➔ articleRender   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 6

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
eloc 6
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
1 View Code Duplication
import EngineApp from '../../Framework/engine.js'
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
let eng =new EngineApp()
3
4
function articlefrag(id,title,content,target){
5
    eng.componentsEngine.createComponent("article"+id,articleRender(title,content))
6
    eng.componentsEngine.renderComponent(target,"article"+id)
7
}
8
9
function articleRender(title,content){
10
    return "<br><div class='articleFrag'>"+
11
    "<h1>"+title+"</h1>"+
12
    "<article>"+content+"</article>"+
13
    "<hr>"+
14
    "</div>"
15
}
16
17
18
export default articlefrag