A simple, fast, lightweight, and extensible template engine for Node.js and browsers.
- 📝 Intuitive Template Syntax: Simple syntax for variables, conditionals, and loops.
- 🔗 Custom global variables: Supports definition of global variables.
- 🛠️ Built-in Tags and Filters: A collection of built-in tags and filters.
- 🎨 Custom Tags and Filters: Ability to define custom tags and filters.
- 🚀 Pre-compilation: Enhance rendering performance by precompiling.
- 🐛 Error Handling and Debugging: Provides detailed error reporting and debugging support.
- 🛡️ Security: Sandbox mode, and automatic escaping.
- 🛫 Asynchronous Data Loading: Supports fetching and displaying remote data asynchronously.
const engine = new Engine()
const html = await engine.render('Hello, {{= name }}!', { name: 'World' })
// or
// const html = await engine.renderFile('./template.html', { name: 'World' })
document.body.innerHTML = html
JianJia
is released under the MIT License. You are free to use, modify, and distribute it as long as you comply with the license terms.