如何在Mustache中实现嵌套函数调用模板?

时间:2021-08-11 18:03:05

I wanted to have a behaviour like this

我想要有这样的行为

{{md5(sha1(base64Encoding({{someValue}})))}}
{{sha1(base64Encoding({{someValue}}))}}

Can I achieve this kind of behaviour using mustache?

我可以用胡子实现这种行为吗?

1 个解决方案

#1


No, Mustache is a logic-less templating engine. You will have to do those hashing computations in your code and use the outcome in Mustache.

不,Mustache是​​一个没有逻辑的模板引擎。您必须在代码中执行这些散列计算并使用Mustache中的结果。

#1


No, Mustache is a logic-less templating engine. You will have to do those hashing computations in your code and use the outcome in Mustache.

不,Mustache是​​一个没有逻辑的模板引擎。您必须在代码中执行这些散列计算并使用Mustache中的结果。