@mdo-org/mdo-core

0.2.13 • Public • Published

mdo-core

mdo-core is meant to be used by MDo plugins and MDo flows.

If you are trying to use MDo to manage your to-dos, you probably want to look at mdo-cli.

Overview

mdo-core contains logic for parsing and processing MDo files. It also exposes some helper methods for dealing (and testing) streams of MDo blocks.

Usage

Stream mode

const fs = require('fs');
const MDo = require('@mdo-org/mdo-core');
const objectStream = fs.createReadStream('./myfile.md').pipe(MDo.parse());

String mode

const { parse, stringify } = require('@mdo-org/mdo-core/lib/strings')

parse('- [ ] hello world').then(blocks => console.log(blocks));

stringify([
  { type: 'INCOMPLETE_TASK', text: '{{type}} hello world'}
]).then(console.log)

Readme

Keywords

none

Package Sidebar

Install

npm i @mdo-org/mdo-core

Weekly Downloads

19

Version

0.2.13

License

SEE LICENSE IN ../../LICENSE

Unpacked Size

471 kB

Total Files

5

Last publish

Collaborators

  • alexishevia