Musty is an incomplete Mustache implementation in Janet.
Mustache templates are strings with special values that are expanded when rendered. Musty handles the rendering in a straightforward way. Give it your template and a dictionary object and you get back to the expanded string. Too easy.
Musty passes Mustache's specs for variables, sections, inverted sections and comments. It does not implement partials, lambdas or custom delimiters.
Add Musty to the dependencies in your project.janet
file:
:dependencies ["https://github.com/pyrmont/musty"]
And then in your Janet code, import the module and call the render method:
(import musty)
(musty/render "Hello {{world}}!" {:world "everybody"})
Checkout the API for more information.
Found a bug? I'd love to know about it. The best way is to report your bug in the Issues section on GitHub.
Musty is licensed under the MIT Licence. See LICENSE for more details.