Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme examples #6

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ A pair of {source, sink} streams that are internally connected,
This can be used to construct pipelines that are connected.

``` js
var pipe = require('it-pipe')
var pair = require('it-pair')
import { pipe } from 'it-pipe'
import { pair } from 'it-pair'

var p = pair()

Expand All @@ -35,9 +35,9 @@ around servers. Use `it-pair/duplex` to get two duplex streams
that are attached to each other.

``` js
var DuplexPair = require('it-pair/duplex')
import { duplex } from 'it-pair/duplex'

var d = DuplexPair()
var d = duplex()

//the "client": pipe to the first duplex and get the response.
pipe(
Expand Down