Maxstache transform stream
npm install maxstache-stream-variable-injection{{ var }} has been made customizable
{mu,min}stache.
sh
$ npm install maxstache-stream-variable-injection
`
Usage
`js
const maxstache = require("maxstache-stream-variable-injection");
const fs = require("fs");
fs.createReadStream("./foobar.txt")
.pipe(
maxstache(
{ name: "jjjohnny", occupation: "wizard" },
"{{\\s([^{}\\s]+)\\s}}"
)
)
.pipe(process.stdout);
`
API
$3
Create a maxstache transform stream that injects an object of variables. Uses
the {{varName}}` syntax to mark variables in templates.