DEV Community

Wilson Tovar
Wilson Tovar

Posted on Micro templating engine for strings only. (Crystal version of Pope.js)

I have published the Crystal version of Pope: A fast, minimal and micro template engine for strings only, it plays well where you want to embed micro templates inside your module.

GitHub repo:

Here is an example:

require ""

data = {
  user: {
    id:       123,
    username: "krthr",
    admin:    true,
    config:   {
      email: "",

  "The user {{user.username}} with id {{}} is cool",
) # "The user krthr with id 123 is cool"

Pope.prop(data, "")           #  123
Pope.prop(data, "") #
Pope.prop(data, "nananana")          # nil
Enter fullscreen mode Exit fullscreen mode

I hope you enjoy!

Top comments (0)