Skip to content

Commit

Permalink
+ lint
Browse files Browse the repository at this point in the history
lint lint lint
  • Loading branch information
lesleyjanenorton committed Aug 7, 2018
1 parent 21de075 commit 2f92727
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 117 deletions.
12 changes: 6 additions & 6 deletions hbs-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ const HBSHelpers = {
return input.toLocaleString();
});

hbs.registerHelper('each_from_to', function(ary, min, max, options) {
if(!ary || ary.length == 0)
hbs.registerHelper("each_from_to", function(ary, min, max, options) {
if(!ary || ary.length === 0)
return options.inverse(this);
let result = [];

const result = [];

for (let i = min; i < max && i < ary.length; i++) {
result.push(options.fn(ary[i], { data : { itemIndex : i } } ));
}
return result.join('');
return result.join("");
});

hbs.registerHelper('if_conditional', function(conditional, value, options) {
hbs.registerHelper("if_conditional", function(conditional, value, options) {
if (conditional.length > value) {
return options.fn(this);
} else {
Expand Down
Loading

0 comments on commit 2f92727

Please sign in to comment.