Skip to content

jstransformers/jstransformer-lodash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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