@n7e/templating
v0.3.0
Published
A simple templating abstraction.
Downloads
11
Maintainers
Readme
Templating
A simple templating abstraction.
For further insights, read on.
Installation
To install this library use your favorite package manager. No additional steps are required to start using the library.
npm install @n7e/templatingThis library really only provides a template engine interface and won't do any good as a JavaScript library.
Template Engine
A template engine has the ability to render a given template identifier in a given context. How the template is located and the result of the rendering is completely up to the implementation.
import { TemplateEngine } from "@n7e/templating";
async function doSomethingWith(templateEngine: TemplateEngine): Promise<void> {
const result = await templateEngine.render("some-template", {name: "Martin"});
// ...
}