Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

mustapas

Mustache implementation in simple procedural Pascal

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

MustaPAS

Mustache implementation in simple procedural Pascal

Design Goal

  • Simple procedural interface in single unit
  • Ease of maintenance and extension
  • Fast enough, but not need to be the fastest

Interface

There's only a single function:

pascal
procedure Render(const Template: TStream; const Context: TJSONObject; Result: TStream);

The use of TStream allows input from and output to any TStream descendant, be it direct string, files, sockets, whatever you can imagine.

Current Compliance Level

  • interpolation (✅)
  • comments (❌)
  • delimiters (❌)
  • inverted (❌)
  • partials (❌)
  • sections (❌)