Skip to content

Commit

Permalink
fix: use jsdoc comments (#8)
Browse files Browse the repository at this point in the history
Gives a nice little mouse-over in vscode when using this module
  • Loading branch information
achingbrain authored Jan 15, 2022
1 parent 597eba0 commit 265b5c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/duplex.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { pair } from './index.js'
import type { Duplex } from 'it-stream-types'

/**
* Two duplex streams that are attached to each other
*/
export function duplexPair <T> (): [Duplex<T>, Duplex<T>] {
const a = pair<T>()
const b = pair<T>()
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import defer from 'p-defer'
import type { Source, Duplex } from 'it-stream-types'

// a pair of streams where one drains from the other
/**
* A pair of streams where one drains from the other
*/
export function pair <T> (): Duplex<T> {
const deferred = defer<Source<T>>()
let piped = false
Expand Down

0 comments on commit 265b5c8

Please sign in to comment.