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

https://github.com/devlop/kobolt

The most simple template factory in the world!
https://github.com/devlop/kobolt

factory javascript template typescript

Last synced: 13 days ago
JSON representation

The most simple template factory in the world!

Awesome Lists containing this project

README

          


Latest Stable Version
License

# kobolt

The most simple template factory in the world!

Turn any `` into a `HTMLElement` in a breeze.

# Installing

using npm

```bash
npm install @devlop/kobolt
```

# Placeholders

Kobolt can automatically replace placeholders in your template using the format `{{ placeholder }}`.

# Usage

```


{{ title }}


```

```
import kobolt from '@devlop/kobolt';

const templateElement = document.querySelector('template');

const outputElement = kobolt(templateElement, {
// pass a key value object with any placeholders that should be replaced.
'title': 'Kobolt',
'id': 'Co',
});

console.log(outputElement.outerHTML);

//


//

Kobolt


//

```