@jackens/md2json
v1.6.14
Published
Markdown to JSON
Downloads
7
Readme
md2json
Markdown to JSON. Works in both Node.js and the browser. Lightweight. No dependencies.
Install
NPM
npm install @jackens/md2json
CDN
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/md2json/master/dist/md2json.js"></script>
or
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/md2json/master/dist/md2json.min.js"></script>
or
<script type="text/javascript" src="https://unpkg.com/@jackens/md2json/md2json.js"></script>
or
<script type="text/javascript" src="https://unpkg.com/@jackens/md2json/md2json.min.js"></script>
Usage
var fs = require('fs')
var md2json = require('@jackens/md2json')
console.log(JSON.stringify(md2json(fs.readFileSync('readme.md', 'utf8')), null, 4))