0.3.2 • Published 7 years ago

jstransformer-lodash v0.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

jstransformer-lodash

Lodash Template support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-lodash

API

var lodash = require('jstransformer')(require('jstransformer-lodash'));
var opts = {};

lodash.render('<h1>Hello <%= place %>!</h1>', opts, {place: 'world'}).body;
//=> '<h1>Hello world!</h1>'

var promise = lodash.renderFileAsync('./path/to/hello.lodash', {}, {place: 'world'});
promise.then(function(data) {
  console.log(data.body);
  //=> '<h1>Hello world!</h1>'
});

License

MIT