v0.37.0 — templates + transformers
Two features landed together in v0.37.0.
Templates — a string templating engine in the spirit of Blade and Edge: {{ }} / {{{ }}} interpolation, {{-- comments --}}, and @-tags (@if/@elseif/@else, @each with $loop, @include/@includeIf, @set, layouts via @layout/@section/@yield, components with slots via @component/@slot, {{ | filters }}, globals, @dump). templates().register(name, src) then render(name, state). Unlike Blade/Edge it interprets templates against a safe expression evaluator instead of eval/new Function, so the same templates run on Node and on Cloudflare Workers. See docs/templates.md.
Transformers — a presentation layer between models and JSON: Transformer<T> with item/collection/document, when/mergeWhen/whenLoaded, and document wrapping. Generator keel make:transformer. See docs/transformers.md.
192 tests; type-checked doc examples.