{"id":20368520,"url":"https://github.com/greybax/md-title","last_synced_at":"2026-04-09T23:08:37.729Z","repository":{"id":57293353,"uuid":"61964057","full_name":"greybax/md-title","owner":"greybax","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-19T00:59:30.000Z","size":19,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T05:52:49.864Z","etag":null,"topics":["helper","js","markdown","markdown-article","md-article","title"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greybax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-25T22:26:54.000Z","updated_at":"2017-06-15T17:07:54.000Z","dependencies_parsed_at":"2022-08-27T12:21:21.179Z","dependency_job_id":null,"html_url":"https://github.com/greybax/md-title","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greybax%2Fmd-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greybax%2Fmd-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greybax%2Fmd-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greybax%2Fmd-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greybax","download_url":"https://codeload.github.com/greybax/md-title/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241913787,"owners_count":20041459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helper","js","markdown","markdown-article","md-article","title"],"created_at":"2024-11-15T00:41:34.036Z","updated_at":"2026-04-09T23:08:37.700Z","avatar_url":"https://github.com/greybax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# md-title\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/greybax/md-title.svg)](https://greenkeeper.io/)\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Coveralls Status][coveralls-image]][coveralls-url]\n[![Dependency Status][depstat-image]][depstat-url]\n\n\u003e get title from markdown article\n\n## Install\n\n    npm install --save md-title\n\n## Usage\n\n```js\nimport getTitle from 'md-title';\n\nconst input = `\n# awesome *heading*\n\n# second heading\n\nparagragh`;\n\ngetTitle(input).text; // awesome heading\ngetTitle(input).html; // \u003ch1\u003eawesome \u003cem\u003eheading\u003c/em\u003e\u003c/h1\u003e\ngetTitle(input).node; // mdast node, see remark API\ngetTitle('');         // undefined\n```\n\n## API\n\n### getTitle(input)\n\n#### input\n\n*Required*  \nType: `String`\n\nMarkdown string.\n\n## Related\n\n* [md-article][md-article] - extract data from your markdown article\n    * [md-content][md-content] - get content from markdown article\n    * [md-date][md-date] - get date from markdown article\n    * [md-tags][md-tags] - get tags from markdown article\n\n## License\n\nMIT © [Aleksandr Filatov](https://alfilatov.com)\n\n\n[npm-url]: https://npmjs.org/package/md-title\n[npm-image]: https://img.shields.io/npm/v/md-title.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/greybax/md-title\n[travis-image]: https://img.shields.io/travis/greybax/md-title.svg?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/greybax/md-title\n[coveralls-image]: https://img.shields.io/coveralls/greybax/md-title.svg?style=flat-square\n\n[depstat-url]: https://david-dm.org/greybax/md-title\n[depstat-image]: https://david-dm.org/greybax/md-title.svg?style=flat-square\n\n[md-article]: https://github.com/greybax/md-article\n[md-content]: https://github.com/greybax/md-content\n[md-date]: https://github.com/greybax/md-date\n[md-tags]: https://github.com/greybax/md-tags","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreybax%2Fmd-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreybax%2Fmd-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreybax%2Fmd-title/lists"}