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

fix: update export name #7

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
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
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/[email protected]
- 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/[email protected]
- 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/[email protected]
- 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/[email protected]
- 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/[email protected]
- 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/[email protected]
- 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/[email protected]
- 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