This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Evaluating mustache templates
version 1.0.3
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.3
Committed At 2017-01-27 13:10:16 UTC
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

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!"