UNPKG

front-matter-markdown

Version:

get the config and toc object from the markdown string.

8 lines (6 loc) 238 B
isFunction = require('util-ex/lib/is/type/function') module.exports = (nodes, type, aFilter)-> nodes.filter (node)-> result = node and node.type == type result = aFilter(node) if result and isFunction(aFilter) result