v0.1.1
Meh weird template engine trying to get the best performance possible
Repository
Current version released
2 years ago
Versions
Weird template engine ππ
use at your own risk am making this for fun
Performance benchmark π₯
How to use
// example using deno: https://deno.land/
import { compile } from "https://cdn.jsdelivr.net/gh/Aiko-Suzuki/uwu-template@main/bundle.js";
const template = Deno.readTextFileSync("bench/test.nnt");
const compiled = compile(template);
const data = {
title: "Test Title 1",
slug: "test-title-1",
id: 1,
type: "TV",
startdate: "2020-01-01",
visible: true,
};
const result = compiled([data]);
console.log(result);
Helper
registerHelper("JSON",(data) => {
return JSON.stringify(data)
})
// {{JSON users}}
supported block
- if π’
- each π’
- elseif π’
default helper
- json
- raw