Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zekth/deno_tiny_templates
A template parser for deno
https://github.com/zekth/deno_tiny_templates
Last synced: about 2 months ago
JSON representation
A template parser for deno
- Host: GitHub
- URL: https://github.com/zekth/deno_tiny_templates
- Owner: zekth
- License: mit
- Created: 2019-05-11T16:53:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-10T13:44:10.000Z (over 4 years ago)
- Last Synced: 2024-10-14T22:17:23.371Z (about 2 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno - deno_tiny_templates - Deno的模板渲染器。 (Uncategorized / Uncategorized)
- awesome-deno-cn - @zekth/deno_tiny_templates
- awesome-deno - deno_tiny_templates - Template renderer for deno.![GitHub stars](https://img.shields.io/github/stars/zekth/deno_tiny_templates?style=plastic) (Modules / Online Playgrounds)
- awesome-deno - deno_tiny_templates - Template renderer for deno. (Modules / Template engine)
README
# Deno Tiny Templates [![Build Status](https://travis-ci.org/zekth/deno_tiny_templates.svg?branch=master)](https://travis-ci.org/zekth/deno_tiny_templates)
A template parser for Deno.
## Usage
```ts
import { Template } from "./mod.ts";const tmpl = decoder.decode(Deno.readFileSync("./myfile.tmpl"));
const t = new Template(tmpl);
t.render({ object: "to", pass: "to", my: "template" });
```## Options
- `openBracket` : Openning bracket of your var. Default : `{{`
- `closeBracket` : Openning bracket of your var. Default : `}}`
- `debug` : If true output warning when value is not found in given object. Default : `false`