For manage Handlebars with custom helpers
npm install @janiscommerce/handlebarsThis package exports Handlebars with many helpers already registered, this will help us write faster and with more functionalities
const { Handlebars } = require('@janiscommerce/handlebars');const template = '<html><body><h1>Example</h1></body></html>';
const templateCompiled = Handlebars.compile(template, 'strict');
const values = {
...
}
templateCompiled(values)📢 Pre Compile the template values
📢 Post Compile the compiled template
This package extends built-in helpers. See custom helpers for more docs and usage.