$ cnpm install hast-util-to-string
Get the plain-text value of a hast node.
npm:
npm install hast-util-to-string
var h = require('hastscript')
var toString = require('hast-util-to-string')
toString(h('p', 'Alpha'))
//=> 'Alpha'
toString(h('div', [h('b', 'Bold'), ' and ', h('i', 'italic'), '.']))
//=> 'Bold and italic.'
toString(node)
Transform a node to a string.
See contributing.md
in rehypejs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
Copyright 2013 - present © cnpmjs.org