UNPKG

markdown-stream-utils

Version:

Utility functions for processing markdown files using object mode streams.

14 lines (11 loc) 300 B
var through = require('through2'), marked = require('marked'); function parseMd() { return through.obj(function(file, enc, onDone) { file.contents = marked.lexer(file.contents.toString()); // push to next transform this.push(file); onDone(); }); } module.exports = parseMd;