ejs-stream
1.0.0 • Public • Published ejs-stream
A through stream for rendering objects with ejs templates
npm install ejs-stream
Usage
Pass a template as first argument to the constructor. The second options
map is passed to the ejs compile
function.
var ejs = require('ejs-stream');
var stream = ejs('Hello <%- name %>');
stream.write({ name: 'you' });
stream.end();
Or piping from a readable stream.
var ejs = require('ejs-stream');
var mongojs = require('mongojs');
var db = mongojs('...', ['customers']);
db.customers.find()
.pipe(ejs('<%- address %> <%- name %>'))
.pipe(process.stdout);
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.0
1
Version History
- VersionDownloads (Last 7 Days)
- 1.0.0
1
Package Sidebar
Install
Weekly Downloads