UNPKG

296 BJavaScriptView Raw
1var through = require('through2');
2
3module.exports = function (file, opts) {
4 var data = '';
5 return through(write, end);
6
7 function write (buf, enc, next) { data += buf; next() }
8 function end () {
9 this.push(data.replace(/X/g, opts.x));
10 this.push(null);
11 }
12};