Passed
Push — master ( fd5993...4f9324 )
by Vinicius
03:57 queued 01:54
created

src/mixin.js   A

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 16
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
cc 0
eloc 9
nc 1
dl 0
loc 16
ccs 5
cts 5
cp 1
crap 0
rs 10
c 0
b 0
f 0
wmc 3
mnd 2
bc 2
fnc 1
bpm 2
cpm 3
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A pageTitleMixin.created 0 10 3
1 2
import { isFunction } from './utils'
2
3 2
const pageTitleMixin = {
4
  created () {
5 10
    const { title } = this.$options
6
7 10
    if (title !== undefined) {
8
      // allow use dinamic title system
9 5
      this.$title = isFunction(title)
10
        ? title.call(this, this)
11
        : title
12
    }
13
  }
14
}
15
16
export default pageTitleMixin
17