@janiscommerce/handlebars
v2.3.0
Published
For manage Handlebars with custom helpers
Downloads
581
Readme
Handlebars
For manage Handlebars with custom helpers
Installation
npm install @janiscommerce/handlebars
📢 API
Description
This package exports Handlebars
with many helpers already registered, this will help us write faster and with more functionalities
Usage
const { Handlebars } = require('@janiscommerce/handlebars');
Examples
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
📢 Helpers
This package extends built-in helpers. See custom helpers for more docs and usage.