formatja
a (runtime) string interpolation library
Summary
| Latest Version | 0.2.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:26 |
Tags
Authors
- David Krause
Installation
nimble install formatja
choosenim install formatja
git clone https://github.com/enthus1ast/formatja
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| formatja | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.10 | No |
| nimja | - | No |
Source
| Repository | https://github.com/enthus1ast/formatja |
|---|---|
| Homepage | https://github.com/enthus1ast/formatja |
| Registry Source | nimble_official |
README
formatja
A simple runtime string interpolation library, that leverages nimjas lexer.
var formatSQLITE = "{{documentName}}__{{dateStr}}.sqlite"
let res = format(formatSQLITE, {"documentName": "FOO", "dateStr": "DATESTR"})
assert res == "FOO__DATESTR.sqlite"
{{ some }} a variable
{# a comment #} a comment
{% ignored %} ignored for now