src/scripts/component/pretty.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 13
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A angular.component(ꞌprettyꞌ).controller 0 4 1
1
/**
2
 pretty
3
 Simple component to pretty print a number.
4
5
 @namespace Components
6
 */
7
'use strict';
8
9
angular.module('game').component('pretty', {
10
  template: '<span ng-bind-html="ct.util.trustHTML(ct.util.prettifyNumber(ct.value, ct.state.player))"></span>',
11
  controller: ['util', 'state', function(util, state) {
12
    this.util = util;
13
    this.state = state;
14
  }],
15
  controllerAs: 'ct',
16
  bindings: {
17
    value: '<'
18
  }
19
});
20