UNPKG

md-to-pdf-ng

Version:

CLI tool for converting Markdown files to PDF.

11 lines (9 loc) 264 B
const extensions = /\.(md|mkd|mdown|markdown)(\.txt)?$/i; /** * Check whether a path is a markdown file. * * @param {string} path file path * * @return true if the extension indicates it's a markdown file. */ module.exports = path => extensions.test(path);