src/js/components/caption.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 14
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

2 Functions

Rating   Name   Duplication   Size   Complexity  
A Mivhak.component(ꞌcaptionꞌ).methods.setText 0 3 1
A Mivhak.component(ꞌcaptionꞌ).created 0 3 1
1
Mivhak.component('caption', {
0 ignored issues
show
Bug introduced by
The variable Mivhak seems to be never declared. If this is a global, consider adding a /** global: Mivhak */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
2
    template: '<div class="mivhak-caption"></div>',
3
    props: {
4
        text: null
5
    },
6
    created: function() {
7
        this.setText(this.text);
8
    },
9
    methods: {
10
        setText: function(text) {
11
            this.$el.html(text);
12
        }
13
    }
14
});