Skip to content

Commit

Permalink
docs: fix pino-abstract-transport and mention hwp (#1174)
Browse files Browse the repository at this point in the history
Closes #1118
  • Loading branch information
simoneb committed Oct 20, 2021
1 parent b48f635 commit d7f6490
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ a simple utility to parse each line. Its usage is highly recommended.
You can see an example using a async iterator with ESM:
```js
import build from 'pino-abstract-stream'
import build from 'pino-abstract-transport'

export default async function (opts) {
return build(async function (source) {
Expand All @@ -130,7 +130,7 @@ or using Node.js streams and CommonJS:
```js
'use strict'

const build = require('pino-abstract-stream')
const build = require('pino-abstract-transport')

module.exports = function (opts) {
return build(function (source) {
Expand All @@ -143,6 +143,8 @@ module.exports = function (opts) {
(It is possible to use the async iterators with CommonJS and streams with ESM.)
To consume async iterators in batches, consider using the [hwp](https://github.com/mcollina/hwp) library.
### Creating a transport pipeline
As an example, the following transport returns a `Transform` stream:
Expand Down

0 comments on commit d7f6490

Please sign in to comment.