https://github.com/streamich/md-mdast
Fast tiny Markdown to MDAST parser
https://github.com/streamich/md-mdast
Last synced: 9 months ago
JSON representation
Fast tiny Markdown to MDAST parser
- Host: GitHub
- URL: https://github.com/streamich/md-mdast
- Owner: streamich
- Created: 2018-10-20T19:01:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-08-03T15:04:02.000Z (11 months ago)
- Last Synced: 2025-08-03T17:20:38.691Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.02 MB
- Stars: 23
- Watchers: 1
- Forks: 0
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# md-mdast
[](https://bundlephobia.com/result?p=md-mdast@1.0.1)
- Markdown to [MDAST](https://github.com/syntax-tree/mdast) converter.
- Small and fast.
- No dependencies.
## Installation
```shell
npm install md-mdast
```
## Usage
```js
const {create} = require('md-mdast');
const parser = create();
console.log(parser.tokenizeBlock('*hello* __world__'));
```
Result:
```
{ type: 'root',
children:
[ { type: 'paragraph',
children:
[ { type: 'emphasis',
children: [ { type: 'text', value: 'hello' } ] },
{ type: 'text', value: ' ' },
{ type: 'strong',
children: [ { type: 'text', value: 'world' } ] } ] } ],
}
```
## License
[Unlicense](http://unlicense.org/) — public domain.