streamclean

Remove unwanted lines from a stream

StreamClean

Removed unwanted lines from a stream.

Suppress comment lines with a regex:

var streamclean = require('streamclean'),
    fs = require('fs'),
    path = require('path');
    
fs.createReadStream('input.js')
    .pipe(streamclean(/^\s*\/\//))
    .pipe(fs.createWriteStream('output.js')));