An open API service indexing awesome lists of open source software.

https://github.com/onedionys/onedionys-template-engine

A library for easily creating and manipulating HTML templates.
https://github.com/onedionys/onedionys-template-engine

onedionys package-manager tea template-engine

Last synced: 5 months ago
JSON representation

A library for easily creating and manipulating HTML templates.

Awesome Lists containing this project

README

          

Welcome to One Dionys - Template Engine! 👋

A library for easily creating and manipulating HTML templates. 💖









## 💾 Requirements

* `Web Browser` - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
* `Internet` - Because many use CDN and to make it easier to find solutions to all problems.

## 🎯 How To Use

#### Example Syntax

```javascript
const TemplateEngine = require('./src/templateEngine');

// Define your template
const template = 'Hello {{ name }}!';

// Create an instance of TemplateEngine with your template
const engine = new TemplateEngine(template);

// Define your data
const data = { name: 'World' };

// Render the template with the data
const result = engine.render(data);
console.log(result); // Output: Hello World!
```

#### Explanation

* The TemplateEngine class provides a way to render templates with dynamic data. It uses double curly braces ({{ }}) as placeholders for variables in the template. When you call the render() method with a data object, it replaces the placeholders with corresponding values from the data object.

#### Return Value

* The render() method returns the rendered template as a string.

## 📆 Release Date

* v1.0.0 : 07 March 2024
* v1.0.1 : 11 March 2024
* v4.0.0 : 11 March 2024
* v4.0.1 : 13 March 2024
* v4.0.2 : 18 March 2024
* v5.0.0 : 31 March 2024

## 🧑 Author

* Facebook : Oned Ionys
* Instagram : @onedionys
* Twitter : @onedionys
* LinkedIn : @onedionys

## 📝 License

* Copyright © 2024 One Dionys
* **One Dionys - Template Engine is an open source project licensed under the MIT license**

## ☕️ Suppport & Donation

Love One Dionys - Template Engine? Support this project by donating or sharing with others in need.

**Made with ❤️ One Dionys**