UNPKG
apim-developer-portal1
Version:
latest (3.0.5)
3.0.5
3.0.1
2.0.5
2.0.3
2.0.2
2.0.1
2.0.0
1.0.0
0.0.1
API management developer portal
apim-developer-portal1
/
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; } }