0.1.3 • Published 11 years ago
tmplt v0.1.3
tmplt.js

Minimal templating for JavaScript.
Usage
var tmpl = '{ foo }, { bar.baz }!';
var data = {
foo: 'Hello',
bar: {
baz: 'World'
}
};
tmplt(tmpl)(data); //=> 'Hello, World!'API
tmplt(tmpl)(data)
Returns a String, the result of interpolating data into tmpl.
tmpl— The template String.data— An Object literal of values.
Installation
Install via npm:
$ npm i --save tmpltInstall via bower:
$ bower i --save yuanqing/tmpltTo use tmplt in the browser, include the minified script in your HTML:
<body>
<!-- ... -->
<script src="path/to/tmplt.min.js"></script>
<script>
// tmplt available here
</script>
</body>Changelog
- 0.1.0
- Initial release