1.0.9 • Published 2 years ago
mitem v1.0.9
miTem
miTem.js is small and fast template engine with twig like syntax
Installation
via yarn:
$ yarn add mitemvia npm:
$ npm install mitemvia bower:
$ bower install mitemHow to use
Examples can be found here
node:
const miTem = require('./mitem');
let template = miTem.compile("{% for item in arr %}{{item.foo}}{% endfor %}");
template({arr: [{foo:"test "}, {foo:"test2"}]})output:
test test2web:
<script src="mitem.js"></script>var template = miTem.compile("{% for item in arr %}{{item.foo}}{% endfor %}");
template({arr: [{foo:"test "}, {foo:"test2"}]})