Skip to content

Commit

Permalink
docs: update readme examples (#6)
Browse files Browse the repository at this point in the history
Update examples in readme
  • Loading branch information
achingbrain authored Jan 12, 2022
1 parent 017709a commit cb775d6
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit cb775d6

Please sign in to comment.