text: const Handlebars = require('handlebars');
  
  Handlebars.registerHelper({
    eq: function (v1, v2) {
      return v1 == v2;
    },
    ne: function (v1, v2) {
      return v1 != v2;
    },
    lt: function (v1, v2) {
      return v1 < v2;
    },
    gt: function (v1, v2) {
      return v1 > v2;
    },
    lte: function (v1, v2) {
      return v1 <= v2;
    },
    gte: function (v1, v2) {
      return v1 >= v2;
    },
    and: function () {
      return Array.prototype.slice.call(arguments).every(Boolean);
    },
    or: function () {
      return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
    },
    nsp: function(v) {
      return v.replace(/ /g, '');
    },
    mod: function(v1, v2) {
      return v1 % v2;
    }
  });
  
  Handlebars.registerHelper('index', (context) => {
    return 'index' in context.data ? context.data.index : context.data.root.index;
  });
  
  module.exports = Handlebars;
  