Module mustache

Mustache template rendering.

Copyright © (C) 2017-2020, Jan Henry Nystrom <JanHenryNystrom@gmail.com> -------------------------------------------------------------------

Authors: Jan Henry Nystrom (JanHenryNystrom@gmail.com).

Description

Mustache template rendering.

The context is given either as a property list or a map with the keys being the tags as atoms. The partials are realised by recursively call rendering until no tags remain.

Data Types

context()

context() = plist:plist() | map()

option()

option() = binary | iolist

template()

template() = binary()

Function Index

render/2 Renders a mustache template, the same as render(Template, Context, iolist).
render/3 Renders a mustache template.

Function Details

render/2

render(Template::template(), Context::context()) -> iolist()

Renders a mustache template, the same as render(Template, Context, iolist).

render/3

render(Template::template(), Context::context(), X3::option()) -> iolist() | binary()

Renders a mustache template. Option is: binary -> a binary is returned iolist -> an iolist is returned (default)


Generated by EDoc