UNPKG
apim-developer-portal4
Version:
latest (4.0.0)
4.0.0
API management developer portal
apim-developer-portal4
/
src
/
services
/
templatingService.ts
10 lines
(8 loc)
•
295 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
Liquid
}
from
"liquidjs"
;
export
class
TemplatingService
{
public
static
async
render
(
template
:
string
,
model
:
Object
):
Promise
<
string
> {
const
engine =
new
Liquid
();
const
result =
await
engine.
parseAndRender
(template, model,
null
);
return
result; } }