unified-stream
!Buildbuild-badgebuild
!Coveragecoverage-badgecoverage
!Downloadsdownloads-badgedownloads
!Sponsorssponsors-badgecollective
!Backersbackers-badgecollective
!Chatchat-badgechatStreaming interface to unified processors.
Note that the interface is streaming, but the code buffers.
Install
This package is ESM only: Node 12+ is needed to use it and it must beimport
ed instead of require
d.npm install unified-stream
## Use
The below example pipes stdin, into an HTML formatter, to stdout.
```js
import {stream} from 'unified-stream'
import {unified} from 'unified'
import rehypeParse from 'rehype-parse'
import rehypeFormat from 'rehype-format'
import rehypeStringify from 'rehype-stringify'
process.stdin
.pipe(
stream(unified().use(rehypeParse).use(rehypeFormat).use(rehypeStringify))
)
.pipe(process.stdout)
API
This package exports the following identifiers:stream
.
There is no default export.stream(processor)
Create a readable/writable stream that transforms with processor
.Contribute
Seecontributing.md
contributing in unifiedjs/.github
health for ways
to get started.
See support.md
support for ways to get help.This project has a code of conductcoc. By interacting with this repository, organization, or community you agree to abide by its terms.