downmark-stream
Transform streaming Markdown to HTML, with object mode
support for
YAML front-matter object (meta and data) streams.
This module uses the Marked module for processing Markdown files and expects the front-matter object returned by the front-matter module.
Installation
npm install downmark-stream
Usage
Markdown processed without front-matter:
var fs = ;var DownmarkStream = ; fs ;
Markdown processed with front-matter:
var fs = ;var DownmarkStream = ;var fm = ;var through = ; fs ;
For more examples, view the contents of the example
directory.
Options
-
markedOptions
expected in the same format as those provided to the Marked module. -
streamOptions
expected as the standard{ objectMode: true }
for object mode streams, orundefined
or{ objectMode: false}
for the standardstring
/buffer
mode stream.
License
MIT, see LICENSE for details.