awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
janl avatar

janl/mustache.js

0
View on GitHub↗
16,723 stars·2,351 forks·JavaScript·MIT·24 viewsmustache.github.io↗

Mustache.js

Mustache.js is a logic-less JavaScript templating engine and implementation of the Mustache specification. It merges data objects with text templates to generate formatted output, ensuring consistent rendering across different programming languages by forbidding complex logic within the templates.

The system distinguishes itself by using a logic-less approach to data binding, relying on simple variable interpolation and conditional block rendering. It supports modularity through partial template inclusion and allows for extended functionality via lambda functions that transform blocks of template text.

The library covers a broad range of capabilities including recursive variable resolution, inverted section handling, and HTML content escaping to prevent cross-site scripting. It also provides a command line interface for processing templates and data objects into text files and utilizes token-based caching to accelerate subsequent rendering cycles.

Features

  • Logic-less Template Engines - Implements a logic-less templating engine that maps data to structured output without embedded programming logic.
  • Hierarchical Variable Resolvers - Resolves variables by searching the current context and traversing up through parent contexts.
  • Specification Implementations - Provides a JavaScript implementation of the Mustache specification for consistent rendering across different languages.
  • Template Interpolation - Injects data values into templates using tags with options for escaped or raw output.
  • Contextual Scope Traversers - Searches for data keys in the current scope and recursively climbs up parent contexts until a value is found.
  • Conditional Section Inversions - Provides a mechanism to render specific blocks of text only when a data key is missing or falsy.
  • Conditional Rendering - Displays or repeats sections of a template based on the truthiness of specific data keys.
  • Conditional Rendering - Implements logic for displaying or repeating template sections based on runtime data conditions.
  • Template Text Transformations - Supports custom lambda functions that receive and transform raw template text blocks during rendering.
  • Template Caches - Caches parsed token trees in memory to eliminate the need for repeated template parsing.
  • Template Partials - Provides reusable template fragments that can be embedded into other templates with dynamic parameters.
  • Character Escaping - Uses replaceable functions to encode special characters in variables to prevent cross-site scripting attacks.
  • Output Escaping - Encodes special characters in variables to prevent cross-site scripting and other injection attacks in web output.
  • Escaping Utilities - Enables users to redefine the default escaping function to control how variables are sanitized for output.
  • Data Interpolation - Injects values into templates using configurable delimiters and custom escaping to avoid syntax conflicts.
  • Partial Templates - Supports the insertion of reusable sub-templates or fragments into a main template for modularity.
  • Template Block Transformers - Supports executing custom functions to transform specific blocks of template text during the rendering process.
  • HTML Templating Engines - Generates dynamic HTML content by injecting data into JavaScript templates on the client side.
  • Template Engines - Minimalist logic-less template engine.
  • Templating Engines - Minimal templating with mustache syntax.

Star history

Star history chart for janl/mustache.jsStar history chart for janl/mustache.js

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Mustache.js

Similar open-source projects, ranked by how many features they share with Mustache.js.
  • handlebars-lang/handlebars.jshandlebars-lang avatar

    handlebars-lang/handlebars.js

    18,640View on GitHub↗

    Handlebars.js is a JavaScript templating engine and logic-less template library used to generate HTML or text by merging data objects with templates. It utilizes an abstract syntax tree parser to transform template strings into executable JavaScript functions. The system separates data from presentation by restricting complex logic to external helper functions rather than the template itself. It features a precompiled template compiler that converts templates into functions before deployment to increase execution speed and reduce startup latency. The engine covers a broad range of content ge

    JavaScripthandlebarsmustachetemplates
    View on GitHub↗18,640
  • linkedin/dustjslinkedin avatar

    linkedin/dustjs

    2,913View on GitHub↗

    Dustjs is a JavaScript templating engine and asynchronous template renderer. It functions as an isomorphic HTML generator, producing consistent output across both client and server environments. The system employs a logic-less template syntax to separate presentation from business logic, utilizing simple tags for iteration and conditional checks. It supports asynchronous data resolution, allowing the rendering process to pause and resume as external data sources respond. The engine provides capabilities for dynamic HTML generation, server-side rendering, and client-side templating. It utiliz

    JavaScript
    View on GitHub↗2,913
  • mde/ejsmde avatar

    mde/ejs

    8,105View on GitHub↗

    EJS is a JavaScript templating engine used to generate HTML by embedding executable JavaScript logic and dynamic data into template files. It functions as both a server-side template processor and a client-side rendering engine, allowing for the creation of dynamic markup in both backend and frontend environments. The engine supports the creation of modular web layouts through partial template inclusion, where smaller reusable components are inserted into parent pages. Users can modify the template syntax by defining custom delimiters to avoid conflicts with other languages. The project cove

    JavaScript
    View on GitHub↗8,105
  • goofychris/art-templategoofychris avatar

    goofychris/art-template

    9,861View on GitHub↗

    art-template is a JavaScript templating engine and HTML template compiler that transforms custom syntax and script statements into optimized HTML output. It functions as a precompiled template engine that converts template source into standalone JavaScript functions to render dynamic content from data. The engine features a template inheritance framework that organizes layouts through nesting, blocks, and inclusions to create reusable components across multiple files. It incorporates automatic output sanitization and encoding to prevent cross-site scripting attacks. The system includes capab

    JavaScriptexpressjavascriptkoa
    View on GitHub↗9,861
See all 30 alternatives to Mustache.js→

Frequently asked questions

What does janl/mustache.js do?

Mustache.js is a logic-less JavaScript templating engine and implementation of the Mustache specification. It merges data objects with text templates to generate formatted output, ensuring consistent rendering across different programming languages by forbidding complex logic within the templates.

What are the main features of janl/mustache.js?

The main features of janl/mustache.js are: Logic-less Template Engines, Hierarchical Variable Resolvers, Specification Implementations, Template Interpolation, Contextual Scope Traversers, Conditional Section Inversions, Conditional Rendering, Template Text Transformations.

What are some open-source alternatives to janl/mustache.js?

Open-source alternatives to janl/mustache.js include: handlebars-lang/handlebars.js — Handlebars.js is a JavaScript templating engine and logic-less template library used to generate HTML or text by… linkedin/dustjs — Dustjs is a JavaScript templating engine and asynchronous template renderer. It functions as an isomorphic HTML… mde/ejs — EJS is a JavaScript templating engine used to generate HTML by embedding executable JavaScript logic and dynamic data… goofychris/art-template — art-template is a JavaScript templating engine and HTML template compiler that transforms custom syntax and script… wycats/handlebars.js — Handlebars.js is a JavaScript templating engine used to generate HTML and other text formats by combining static… tj/ejs — ejs is an embedded JavaScript template engine for Node.js that generates HTML and other text formats by embedding…