When given a filename as the first argument, the file will be opened
and piped into the stream. The stream also collects all it's entries in
the entries property:
var assert =require('assert');
var mdCodeStream =require('md-code-stream');
var readme =mdCodeStream('README.md');
readme.on('end',function(){
assert.equal(readme.entries.length,3);
});
The stream is compatible with fstream,
so you can pipe it to a directory: