hast-util-to-string
hast utility to get the plain-text value of a node
Last updated 3 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ 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

  • 1.0.4                                ...           latest (3 months ago)

5 Versions

  • 1.0.4                                ...           3 months ago
  • 1.0.3                                ...           6 months ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |