A fast compiler for the Mustache templating language with separate scanning, parsing, and code generation phases.
Hogan.js is a JavaScript compiler for the Mustache templating language that transforms Mustache templates into optimized JavaScript objects. It solves the problem of slow template rendering by providing fast compilation and the ability to pre-compile templates on the server for efficient client-side usage.
JavaScript developers working with templating systems who need high-performance Mustache compilation, especially those building applications that render templates on both server and client sides.
Developers choose Hogan.js for its exceptional speed, clean separation of compilation phases, and ability to use pre-compiled templates without shipping the compiler to the client, reducing bundle size and improving performance.
A compiler for the Mustache templating language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Optimized for speed in real-world workloads, with benchmarks and testing emphasized in the README for efficient template rendering.
Separate scanning, parsing, and code generation stages allow extensibility and custom template processing, as demonstrated by the exposed scan and parse APIs.
Templates can be compiled on the server and used client-side without the compiler, reducing bundle size and improving load times, a key feature highlighted in the README.
Supports advanced composition patterns and maintains compatibility with other Mustache implementations like mustache.java and mustache.php.
Officially marked as unmaintained, posing risks for bug fixes, security updates, and compatibility with newer JavaScript environments.
Lambda-replace features from the Mustache spec require the compiler and original template source to be present, undermining the pre-compilation benefits for advanced use cases.
Setting up custom section tags or delimiters involves manual options configuration, which can be cumbersome compared to more integrated templating solutions.