runty
Extensible conditional string micro templates
Simple, but powerful
Runty's template syntax is simple and easy to learn, but powerful enough to handle almost any complex string formatting needs.
Built to be extended
Define your own custom functions or try some of ours! Use runty as the foundation for your project's string formatting engine.
Bundle-bloat friendly
Small, tree-shakeable library with zero dependencies.
Template engine alone:
~4.11kB minified (~1.77kB gzipped)
With entire fns standard library:
~6.55kB minified (~2.48kB gzipped)
Parse once, execute multiple times
Templates are parsed and compiled into re-usable functions.
Optional Array output
Drop React components in the middle of a string — or use it for fine-grained control of the stringification of your template.
TypeScript friendly
Built with TypeScript, so it comes with types!