Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 401 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 401 Bytes

Elm-Mustache

An Elm library for mustache templates

Usage

import Mustache


template : String
template =
  "Hi, my name is {{ name }}.{{# show }} Show me!{{/ show }}"

evaluatedTemplate : String
evaluatedTemplate =
  Mustache.render
    [ Mustache.Variable "name" "John"
    , Mustache.Section "show" True
    ]
    template

-- evaluatedTemplate == "Hi, my name is John. Show me!"