Utility Template Tags for ES2015+

JSON →
library 1.8.2 ·javascript
verified May 27, 2026

common-tags provides a collection of reusable template literal tag functions for JavaScript (ES2015+). These tags offer functionalities like HTML escaping (`html`, `safeHtml`), string stripping and indentation (`stripIndent`, `oneLine`), and list formatting (`commaLists`, `inlineLists`). The current stable version is 1.8.2. While there's a pre-release v2.0.0-alpha.1 hinting at future TypeScript adoption and documentation rewrite, the package has a relatively stable, though not very frequent, release cadence for major features, with minor patches addressing bugs or internal tooling. It differentiates itself by offering a robust, well-tested set of common string manipulation utilities often needed when working with template literals, particularly for generating clean, formatted output like HTML or SQL, without the overhead of larger templating engines. It also provides an API for creating custom tags, emphasizing modularity and extensibility for custom text processing scenarios. Since version 1.8.0, it is entirely dependency-free, making it a lightweight choice for modern JavaScript projects.

total hits 22
actors 8 distinct systems
last hit 6d ago AhrefsBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
3

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇸🇬 Singapore · 🇫🇷 France