README
@juliuste/mdjson
Transform markdown to an object with headings as keys. Originally forked from yoshuawuyts/mdjson.
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.