Package Exports
- mdast-util-to-string
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdast-util-to-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mdast-util-to-string

Get the plain text content of an MDAST node.
Installation
npm:
npm install mdast-util-to-string
Usage
var remark = require('remark');
var toString = require('mdast-util-to-string');
var tree = remark().parse('Some _emphasis_, **importance**, and `code`.');
console.log(toString(tree)); //=> 'Some emphasis, importance, and code.'
API
toString(node)
Get the text content of a node.
The algorithm checks value
of node
, then alt
, and finally title
.
If no value is found, the algorithm checks the children of node
and
joins them (without spaces or newlines).
This is not a markdown to plain-text library. Use
strip-markdown
for that.
Related
nlcst-to-string
— Get text content in NLCSThast-util-to-string
— Get text content in HASThast-util-from-string
— Set text content in HAST