rendy
v5.0.1
Published
simplest template engine
Readme
Rendy

Simple template engine compatible with handlebars and mustache.
Install

npm i rendy
How to use?
import {rendy} from 'rendy';API
rendy(template: string, value: Values, modifiers?: Modifiers)
Values is:
type Values = {
[key: string]: unknown;
};
type Modifiers = {
[key: string]: (value: unknown) => string;
};rendy('hello {{ value }}', {
value: 'world',
});
// returns
'hello world';
const values = {
names: ['a', 'b', 'c'],
};
const modifiers = {
implode: (a) => a.join(', '),
};
rendy('hello {{ names | implode }}', values, modifiers);
// returns
'hello a, b, c';License
MIT
