strformat is a minimal string templating engine, intended for short strings such as file names. It is inspired by Webpack template strings, with additional features such as pipes and default values.
Design goals:
- Easily readable syntax
- Avoid tokens commonly used in other templates/interpolations, e.g. Bash
(
$foo
,${foo}
,$(foo)
), GitLab CI, GitHub (${{foo}}
) - Extensibility: allow applications to add their own context values
- Security: do not directly allow evaluating user input
- @tkesgar/strformat: use strformat in JavaScript code
- @tkesgar/strformat-cli: use strformat in CLI