Dart library that parses and renders Mustache templates
open sourceBSD-2-Clausefree
A Dart library to parse and render Mustache templates. It passes the Mustache specification's tests, escapes HTML in variable output by default, and has a strict mode (unknown tags and missing values throw a TemplateException) and a lenient one (missing values render as nothing). A template is parsed once and can be rendered any number of times with different values, from maps or objects, with nested paths. Published on pub.dev by the Flutter team, who maintain it in flutter/core-packages; the code started as Greg Lowe's mustache library.
Problems it solves
- render logic-less Mustache templates in a Dart or Flutter app
- generate text files from templates in a Dart command-line tool
- fill in HTML or email templates from a map of values in Dart
Features
- passes the Mustache specification tests
- HTML-escapes variable output by default
- strict and lenient modes
- parse once, render many times
- nested paths in tags
