Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

it-pair

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-pair - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

3

dist/src/duplex.d.ts
import type { Duplex } from 'it-stream-types';
/**
* Two duplex streams that are attached to each other
*/
export declare function duplexPair<T>(): [Duplex<T>, Duplex<T>];
//# sourceMappingURL=duplex.d.ts.map
import { pair } from './index.js';
/**
* Two duplex streams that are attached to each other
*/
export function duplexPair() {

@@ -3,0 +6,0 @@ const a = pair();

import type { Duplex } from 'it-stream-types';
/**
* A pair of streams where one drains from the other
*/
export declare function pair<T>(): Duplex<T>;
//# sourceMappingURL=index.d.ts.map

4

dist/src/index.js
import defer from 'p-defer';
// a pair of streams where one drains from the other
/**
* A pair of streams where one drains from the other
*/
export function pair() {

@@ -4,0 +6,0 @@ const deferred = defer();

{
"name": "it-pair",
"version": "2.0.3",
"description": "pair a source async iterable stream and a sink async iterable stream",
"version": "2.0.2",
"homepage": "https://github.com/alanshaw/it-pair",
"author": "Alan Shaw",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/alanshaw/it-pair#readme",
"repository": {
"type": "git",
"url": "git://github.com/alanshaw/it-pair.git"
"url": "git+https://github.com/alanshaw/it-pair.git"
},
"bugs": {
"url": "https://github.com/alanshaw/it-pair/issues"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",

@@ -16,7 +25,11 @@ "types": "./dist/src/index.d.ts",

"*",
"*/index",
"dist/*",
"dist/*/index",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]

@@ -33,5 +46,7 @@ }

".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
},
"./duplex": {
"types": "./dist/src/duplex.d.ts",
"import": "./dist/src/duplex.js"

@@ -73,11 +88,11 @@ }

{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"

@@ -112,5 +127,9 @@ },

"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",

@@ -131,26 +150,23 @@ "section": "Tests"

"lint": "aegir lint",
"dep-check": "aegir dep-check dist/src/**/*.js dist/test/**/*.js",
"build": "tsc",
"pretest": "npm run build",
"test": "aegir test -f ./dist/test",
"test:chrome": "npm run test -- -t browser --cov",
"test:chrome-webworker": "npm run test -- -t webworker",
"test:firefox": "npm run test -- -t browser -- --browser firefox",
"test:firefox-webworker": "npm run test -- -t webworker -- --browser firefox",
"test:node": "npm run test -- -t node --cov",
"test:electron-main": "npm run test -- -t electron-main",
"release": "semantic-release"
"dep-check": "aegir dep-check",
"build": "aegir build",
"test": "aegir test",
"test:chrome": "aegir test -t browser --cov",
"test:chrome-webworker": "aegir test -t webworker",
"test:firefox": "aegir test -t browser -- --browser firefox",
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release"
},
"dependencies": {
"it-stream-types": "^1.0.3",
"p-defer": "^4.0.0"
},
"devDependencies": {
"aegir": "^36.1.3",
"aegir": "^37.4.8",
"it-all": "^1.0.6",
"it-drain": "^1.0.5",
"it-pipe": "^2.0.0"
},
"author": "Alan Shaw",
"license": "MIT",
"dependencies": {
"it-stream-types": "^1.0.3",
"p-defer": "^4.0.0"
}
}

@@ -1,7 +0,20 @@

# it-pair
# it-pair <!-- omit in toc -->
[![Build Status](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml/badge.svg?branch=master)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml)
[![Dependencies Status](https://status.david-dm.org/gh/alanshaw/it-pair.svg)](https://david-dm.org/alanshaw/it-pair)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-pair.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-pair)
[![CI](https://img.shields.io/github/workflow/status/alanshaw/it-pair/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml)
> pair a source async iterable stream and a sink async iterable stream
## Table of contents <!-- omit in toc -->
- [Install](#install)
- [License](#license)
- [Contribution](#contribution)
## Install
```console
$ npm i it-pair
```
A pair of {source, sink} streams that are internally connected,

@@ -12,3 +25,3 @@ (what goes into the sink comes out the source)

``` js
```js
import { pipe } from 'it-pipe'

@@ -38,3 +51,3 @@ import { pair } from 'it-pair'

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

@@ -70,2 +83,9 @@

MIT
Licensed under either of
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
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>] {

@@ -5,0 +8,0 @@ const a = pair<T>()

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> {

@@ -6,0 +8,0 @@ const deferred = defer<Source<T>>()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc