hast-util-to-string
hast utility to get the plain-text value of a node
Last updated 5 years ago by wooorm .
MIT · Repository · Bugs · Original npm
$ cnpm install hast-util-to-string 
SYNC missed versions from official npm registry.

hast-util-to-string

Build Coverage Downloads Size Sponsors Backers Chat

Get the plain-text value of a hast node.

Install

npm:

npm install hast-util-to-string

Use

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.'

API

toString(node)

Transform a node to a string.

Contribute

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.

License

MIT © Titus Wormer

Current Tags

  • 2.0.0                                ...           latest (4 years ago)

3 Versions

  • 2.0.0                                ...           4 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org