(function () {
  'use strict';

  var powers = ['k', 'm', 'g', 't', 'p', 'e', 'z', 'y'];

  function resolveDivider(id) {
    switch (id) {
    case 'i':
      return 1024;
    }

    return 1000;
  }

  angular.module('ngKUICore')
    .filter('unit', ['numberFilter',
      function (numberFilter) {
        return function (input, unit, decimals, mutate) {
          if (isNaN(input)) {
            return NaN;
          }

          var first = unit.substring(0, 1).toLowerCase();
          var second = unit.substring(1, 2);
          var power = powers.indexOf(first);
          if (power++ === -1) {
            throw 'Unknown unit';
          }

          var divider = resolveDivider(second);
          var upperCase = unit[0] === unit[0].toUpperCase();
          var value = input / Math.pow(divider, power);

          while (mutate && value >= divider) {
            value = input / Math.pow(divider, ++power);
            unit = powers[power - 1] + unit.substring(1);
          }

          if (decimals) {
            value = numberFilter(value, decimals);
          }

          if (upperCase) {
            unit = unit[0].toUpperCase() + unit.substring(1);
          }

          return value + ' ' + unit;
        };
      }
    ]);
})();
@@ -1008,16 +1008,30 @@
 decimals
+ !== undefined
 ) %7B%0A    
@@ -1261,8 +1261,9 @@
 );%0A%7D)();
+%0A

Update unit-filter.js