1.0.4 • Published 9 years ago
get-md-title v1.0.4
get-md-title
get title from markdown article
Install
npm install --save get-md-title
Usage
import getTitle from 'get-md-title';
const input = `
# awesome *heading*
# second heading
paragragh`;
getTitle(input).text; // awesome heading
getTitle(input).html; // awesome <em>heading</em>
getTitle(input).node; // AST node, see commonmark API
getTitle(''); // undefined ¯\_(ツ)_/¯
API
getTitle(input)
input
Required
Type: String
Markdown string.
Related
- get-md-content - get content from markdown article
- get-md-date - get date from markdown article
- get-md-desc - get description from markdown article
- get-md-image - get image from markdown article
License
MIT © Vladimir Starkov