-module(l4u@bbmustache_js). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([string/1, compile/1, render/2]). -spec string(binary()) -> gleam@bbmustache:argument(). string(Arg) -> gleam_bbmustache_native:argument(Arg). -spec compile(binary()) -> gleam@bbmustache:template(). compile(Src) -> _assert_subject = gleam@bbmustache:compile(Src), {ok, Template} = case _assert_subject of {ok, _} -> _assert_subject; _assert_fail -> erlang:error(#{gleam_error => let_assert, message => <<"Assertion pattern match failed"/utf8>>, value => _assert_fail, module => <<"l4u/bbmustache_js"/utf8>>, function => <<"compile"/utf8>>, line => 61}) end, Template. -spec render( gleam@bbmustache:template(), list({binary(), gleam@bbmustache:argument()}) ) -> binary(). render(Template, Table) -> gleam@bbmustache:render(Template, Table).