get-title-markdown

get title from markdown.

Usage no npm install needed!

<script type="module">
  import getTitleMarkdown from 'https://cdn.skypack.dev/get-title-markdown';
</script>

README

get-title-markdown Build Status

Get # title content from Markdown string.

HTML Version : azu/get-html-title

Installation

npm install get-title-markdown

Usage

test.md

# Title

test text

Get title content from above markdown.

var getTitle = require("get-title-markdown");
var content = fs.readFileSync(__dirname + "/test.md", "utf-8");
getTitle(content); // => "Title"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT