/*global angular */

(function (angular) {

    // -- MODULE DECLARATION
    angular.module("ngFilesizeFilter", [])

    // FILTER
    .filter("filesize", function () {

        /**
         * An array of units, starting at bytes and ending with yottabytes.
         */
        var units = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];

        return function(bytes, precision) {

            if (isNaN(parseFloat(bytes)))
                return "-";
            if (isNaN(precision))
                precision = 1;

            if (bytes < 1)
                return "0 B";

            var unitIndex = Math.floor(Math.log(bytes) / Math.log(1000)),
                value = bytes / Math.pow(1000, unitIndex);

            return value.toFixed(precision) + " " + units[unitIndex];

        };

    });

})(angular);

@@ -380,24 +380,56 @@
 ecision) %7B%0A%0A
+            // validate 'bytes'%0A
             
@@ -457,16 +457,18 @@
 bytes)))
+ %7B
 %0A       
@@ -490,16 +490,28 @@
  %22-%22;%0A  
+ 
+         %7D%0A
         
@@ -516,29 +516,56 @@
     
+  
 if (
-isNaN(precision))
+bytes %3C 1) %7B%0A                return %220 B%22;
 %0A   
@@ -572,21 +572,45 @@
         
+ %7D%0A%0A
      
+       // validate '
 precisio
@@ -614,14 +614,9 @@
 sion
- = 1;%0A
+'
 %0A   
@@ -628,26 +628,35 @@
     if (
-bytes %3C 1)
+isNaN(precision)) %7B
 %0A       
@@ -664,29 +664,44 @@
         
+p
 re
-turn %220 B%22;
+cision = 1;%0A            %7D
 %0A%0A      

Add braces to every 'if' block