Skip to content

Commit

Permalink
fix: update export name (#7)
Browse files Browse the repository at this point in the history
Change export name for duplex pair
  • Loading branch information
achingbrain authored Jan 13, 2022
1 parent 4d8422c commit eddce54
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: node
Expand All @@ -50,7 +50,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome
Expand All @@ -65,7 +65,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome-webworker
Expand All @@ -80,7 +80,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox
Expand All @@ -95,7 +95,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox-webworker
Expand All @@ -110,7 +110,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-main
Expand All @@ -125,7 +125,7 @@ jobs:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@v2.1.0
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-renderer
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ around servers. Use `it-pair/duplex` to get two duplex streams
that are attached to each other.

``` js
import { duplex } from 'it-pair/duplex'
import { duplexPair } from 'it-pair/duplex'

var d = duplex()
var d = duplexPair()

//the "client": pipe to the first duplex and get the response.
pipe(
Expand Down
2 changes: 1 addition & 1 deletion src/duplex.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { pair } from './index.js'
import type { Duplex } from 'it-stream-types'

export function duplex <T> (): [Duplex<T>, Duplex<T>] {
export function duplexPair <T> (): [Duplex<T>, Duplex<T>] {
const a = pair<T>()
const b = pair<T>()
return [
Expand Down
4 changes: 2 additions & 2 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'aegir/utils/chai.js'
import { pipe } from 'it-pipe'
import { pair } from '../src/index.js'
import { duplex } from '../src/duplex.js'
import { duplexPair } from '../src/duplex.js'
import all from 'it-all'
import drain from 'it-drain'

Expand Down Expand Up @@ -33,7 +33,7 @@ describe('it-pair', () => {
})

it('echo duplex', async () => {
const d = duplex<number>()
const d = duplexPair<number>()
const p = pipe(
[1, 2, 3],
d[0],
Expand Down

0 comments on commit eddce54

Please sign in to comment.