Completed
Push — master ( 4eae54...b72a16 )
by Andres
01:12
created

angular.filter(ꞌkeylengthꞌ)   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 8
rs 9.4285
nop 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A ��) 0 6 2
1
'use strict';
2
3
angular.module('game', ['ngAnimate', 'ui.router'])
4
.filter('keylength', function(){
5
  return function(input){
6
    if(!angular.isObject(input)){
7
      throw Error('Usage of non-objects with keylength filter!!');
8
    }
9
    return Object.keys(input).length;
10
  };
11
});
12