v0.1.3
Meh weird template engine trying to get the best performance possible
Repository
Current version released
a year 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