Skip to content

Commit

Permalink
fix: handlebars exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-KumarH committed Mar 4, 2024
1 parent febf275 commit 57a683e
Show file tree
Hide file tree
Showing 4 changed files with 935 additions and 463 deletions.
4 changes: 2 additions & 2 deletions handlebars/helper-eq.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as _ from 'lodash';
export default (hbs, opts) => {
const _ = require('lodash');
module.exports = function (hbs, opts) {
hbs.registerHelper('eq', function(value1, value2) {
return _.isEqual(value1, value2);
});
Expand Down
2 changes: 1 addition & 1 deletion handlebars/helper-list.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default (hbs, opts) => {
module.exports = function (hbs, opts) {
hbs.registerHelper("list", function(items, options) {
const itemsAsHtml = items.map(item => "<li>" + options.fn(item) + "</li>");
return "<ul>\n" + itemsAsHtml.join("\n") + "\n</ul>";
Expand Down
Loading

0 comments on commit 57a683e

Please sign in to comment.