unified

Project: retextjs/retext

Package: retext-stringify@3.1.0

  1. Dependents: 0
  2. retext plugin to serialize prose
  1. unified 180
  2. plugin 140
  3. retext 42
  4. tree 41
  5. syntax 27
  6. retext-plugin 26
  7. text 19
  8. stringify 18
  9. compile 13
  10. language 12
  11. serialize 11
  12. natural 9
  13. cst 6
  14. concrete 5

retext-stringify

Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to serialize natural language. Compiler for unified. Serializes nlcst syntax trees.

Sponsors

Support this effort and give back by sponsoring on OpenCollective!

Vercel

Motif

HashiCorp

GitBook

Gatsby

Netlify

Coinbase

ThemeIsle

Expo

Boost Note

Holloway


You?

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install retext-stringify

Use

import {unified} from 'unified'
import {stream} from 'unified-stream'
import retextEnglish from 'retext-english'
import retextStringify from 'retext-stringify'
import retextEmoji from 'retext-emoji'

const processor = unified()
  .use(retextEnglish)
  .use(retextEmoji, {convert: 'encode'})
  .use(retextStringify)

process.stdin.pipe(stream(processor)).pipe(process.stdout)

API

This package exports no identifiers. retextStringify is the default export.

unified().use(retextStringify)

Serialize nlcst syntax trees. There is no configuration.

Contribute

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help. Ideas for new plugins and tools can be posted in retextjs/ideas.

A curated list of awesome retext resources can be found in awesome retext.

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