Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/minstache
Mini mustache template engine
https://github.com/chemzqm/minstache
Last synced: 10 days ago
JSON representation
Mini mustache template engine
- Host: GitHub
- URL: https://github.com/chemzqm/minstache
- Owner: chemzqm
- Created: 2014-04-20T16:45:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-14T02:14:41.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T12:56:49.282Z (about 2 months ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# minstache
Mini mustache template engine.
## Installation
$ component install chemzqm/minstache
## Usage
* `{name}` no convert for single brackets.
* `{{name}}` for escape attribute.
* `{{!name}}` should not escape `name`.
* `{{#admin}}admin{{/admin}}` render admin if `admin`.
* `{{^authenticated}}login{{/authenticated}}` render login if not `authenticated`.
* `{{name.frist}}` render `first` attribute of `name`.
* `{{#contacts}}
## API
### minstache(string, [obj])
Compile and render the given mustache `string` with optional context `obj`.
### minstache.compile(string)
Compile the mustache `string` to a stand-alone `Function` accepting a context `obj`.
## License
MIT