1.0.1 • Published 6 months ago

orgast-util-to-string v1.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
6 months ago

orgast-util-to-string

orgast (uniorg) utility to get the plain text content of a node.

Install

npm install orgast-util-to-string

Use

import { unified } from 'unified';
import uniorgParse from 'uniorg-parse';
import { toString } from 'orgast-util-to-string';

const tree = unified()
  .use(uniorgParse)
  .parse('Some /emphasis/, *importance*, and ~code~.');

console.log(toString(tree)); //=> 'Some emphasis, importance, and code.'

API

toString(node[, options])

Get the text content of a node or list of nodes.

The algorithm checks value of node. If no value is found, the algorithm checks the children of node and joins them (without spaces or newlines).

This is not an org-mode to plain-text library.

License

GNU General Public License v3.0 or later

1.0.1

6 months ago

1.0.0

1 year ago

0.5.6

1 year ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.0

2 years ago

0.5.1

2 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago