
stream-handlebars
Extends handlebars with a streaming interface for .compile().
Example
var handlebars = require('stream-handlebars')
var fs = require('fs')
var template = '<p>\{{paragraph}}</p>'
handlebars.registerPartial('whatever', 'the partial content')
var compileStream = handlebars.createCompileStream(template)
fs.createReadStream('./template-data.json', 'utf8')
.pipe(compileStream)
.pipe(process.stdout)
handlebars : object
⏏
The regular handlebars module.
Kind: Exported namespace
Extends: handlebars
handlebars.createCompileStream(template, [options]) ⇒ Transform
a stream wrapper for the handlebars.compile function
Kind: static method of handlebars
template | string | required template |
[options] | object | options passed to both Transform() and .compile() |
[options.objectMode] | object | set to true if you wish you pass in the data as an object |
[options.data] | object | default data object |
© 2015-16 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.