JavaScript97.3%
TypeScript2.7%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
henhal

If a text has placeholders, but also substrings that match the placeholder pattern (e.g. ) but should not be substituted but remain as literals, how do I escape them so that they're not interpreted as placeholders? Is the only way to actually perform substitution with the literal itself, i.e. or is there a way to escape placeholder tokens?

henhal · 1y ago
tommy-mitchell
Support filtersClosedIssue

Many templating languages support filtering individual interpolated values: supports transforming all values, but not individual ones. The regex to match items could be modified to: This would match an arbitrary number of filters separated by . (regex101) Filters would just be an object of functions passed to and would be applied in order from left to right. Filters in the template without a match could have the same semantics as a missing value (either get ignored or throw, perhaps with a new ). Related, some further improvements to the regex could be supporting arbitrary whitespace and characters:

tommy-mitchell · 1y ago
nghieptiki

Hi guys, Sometimes, my data is an object that includes a character. Maybe should be supported character to escape the character.

nghieptiki · 1y ago
Structured data for AI agents

Repository: sindresorhus/pupa. Description: Simple micro templating Stars: 372, Forks: 21. Primary language: JavaScript. Languages: JavaScript (97.3%), TypeScript (2.7%). License: MIT. Topics: interpolation, npm-package, placeholder, string, template-, template-engine, template-library, templating. Latest release: v3.3.0 (1y ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, apsknight, BendingBender, peteruithoven, Richienb, yuhr.