A template engine to inject scripts or stylesheet into the dom
npm install @rexfng/tpl`|
|head|Array of Strings|Strings to be inserted in the tag if it is unfound from "dom", will be appended. They will be appended in the order of the array.|`["", ""]`|
|bottom|Array of Strings|Strings to be inserted in the end of |`["", ""]`|
Usage
`javascript
const Template = require('@rexfng/tpl')
let tpl = Template.init({
dom: Mustache.render("{{title}}
spends {{calc}}", view),
head: [
''
],
bottom: [
'',
'',
''
]
})//can be use in express or http
res.set('Content-Type', 'text/html');
res.send(tpl)
``