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