0.1.7 • Published 9 years ago
underscore.template v0.1.7
underscore.template
Extracted template from Underscore, use
_.templatewithout full underscore source.
Installation
NPM
npm install underscore.templateBower
bower install underscore.templateUsage
Node.js
var UnderscoreTemplate = require('underscore.template');
var template = UnderscoreTemplate("<b><%- value %></b>");
template({value: 'hello world'});
// <b>hello world</b>
template({value: '<script>'});
// <b><script></b>Browser
Simply download the latest minified version from the dist/ folder. API is available in a global object called UnderscoreTemplate.
<script src="./dist/underscore.template.js"></script>var template = UnderscoreTemplate("<b><%- value %></b>");
template({value: 'hello world'});
// <b>hello world</b>Testing
npm testLicense
MIT, see the LICENSE file for detail.
