md-mdast
TypeScript icon, indicating that this package has built-in type declarations

3.4.0 • Public • Published

md-mdast

  • Markdown to MDAST converter.
  • Small and fast.
  • No dependencies.

Installation

npm install md-mdast

Usage

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 — public domain.

Package Sidebar

Install

npm i md-mdast

Weekly Downloads

18

Version

3.4.0

License

none

Unpacked Size

123 kB

Total Files

121

Last publish

Collaborators

  • streamich