Template.filledStars.helpers({
    numbers: function () {
        let value = isNaN(this.value) ? 0 : this.value;
        value = Math.min(Math.max(0, value), 5);
        let res = [];
        for (let i = 1; i <= 5; i++) {
            res.push(i <= value ? 100 : (Math.ceil(value) == i ? (value - Math.floor(value)) * 100 : 0));
        }
        return res;
    }
});
@@ -168,82 +168,40 @@
     
-let res = %5B%5D;%0A        for (let i = 1; i %3C= 5; i++) %7B%0A            res.push(
+return _.range(1, 6).map((i) =%3E 
 i %3C=
@@ -285,38 +285,8 @@
 ));%0A
-        %7D%0A        return res;%0A
     

refactor for filled stars