Org-mode parser compatible with unified ecosystem.
npm install uniorg-parse
var unified = require('unified')
var createStream = require('unified-stream')
var uniorgParse = require('uniorg-parse')
var uniorg2rehype = require('uniorg-rehype')
var html = require('rehype-stringify')
var processor = unified().use(uniorgParse).use(uniorg2rehype).use(html)
process.stdin.pipe(createStream(processor)).pipe(process.stdout)
Configure the processor
to read Org as input and process uniorg syntax trees.
Parse string.
import { parse } from 'uniorg-parse/lib/parser';
console.log(parse('* example document'))