get-md-desc
get description from markdown article
Install
npm install --save get-md-desc
Usage
; const input = `# title * nope Published yesterday Or in 21 december 2012 True *description*`; text; // Published yesterdaytext; // Published yesterdaytext; // True descriptionhtml; // True <em>description</em>node; // AST node, see commonmark API; // undefined ¯\_(ツ)_/¯
API
getDesc(input, [exclude])
input
Required
Type: String
Markdown string.
exclude
Type: String
or RegExp
Default: null
Pattern, which paragraph of description should not contain.
Related
- article-data - extract data from your markdown article
- get-md-content - get content from markdown article
- get-md-date - get date from markdown article
- get-md-image - get image from markdown article
- get-md-title - get title from markdown article
License
MIT © Vladimir Starkov