@juliuste/mdjsondeprecated

Transform markdown to an object with headings as keys. Originally forked from yoshuawuyts/mdjson.

Usage no npm install needed!

<script type="module">
  import juliusteMdjson from 'https://cdn.skypack.dev/@juliuste/mdjson';
</script>

README

@juliuste/mdjson

Transform markdown to an object with headings as keys. Originally forked from yoshuawuyts/mdjson.

npm version Build Status Greenkeeper badge license chat on gitter

Installation

npm install @juliuste/mdjson

Usage

const mdjson = require('@juliuste/mdjson')

const dictionary = mdjson(`
    text before any headings will be ignored

    # my heading
    oh wow, amazing
    newline means new paragraph

    another paragraph

    ### another heading
    gorgeous copy, stunning, [some other markdown](https://www.abc.de)

    ## headings without content will also be ignored
`)
// => {
//  'my heading': 'oh wow, amazing\n\nnewline means new paragraph\n\nanother paragraph',
//  'another heading': 'gorgeous copy, stunning, [some other markdown](https://www.abc.de)'
//}

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.