Skip to content

greybax/md-title

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md-title

Greenkeeper badge

NPM version Build Status Coveralls Status Dependency Status

get title from markdown article

Install

npm install --save md-title

Usage

import getTitle from 'md-title';

const input = `
# awesome *heading*

# second heading

paragragh`;

getTitle(input).text; // awesome heading
getTitle(input).html; // <h1>awesome <em>heading</em></h1>
getTitle(input).node; // mdast node, see remark API
getTitle('');         // undefined

API

getTitle(input)

input

Required
Type: String

Markdown string.

Related

  • md-article - extract data from your markdown article
    • md-content - get content from markdown article
    • md-date - get date from markdown article
    • md-tags - get tags from markdown article

License

MIT © Aleksandr Filatov

Releases

No releases published

Packages

No packages published