🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

it-pipe

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-pipe - npm Package Compare versions

Comparing version

to
2.0.4

2

dist/src/index.d.ts

@@ -7,3 +7,3 @@ import type * as it from 'it-stream-types';

export declare type Transform<A, B> = it.Transform<A, B> | it.Duplex<B, A, any>;
export declare type Sink<A, B> = it.Sink<A, B> | it.Duplex<A, any, B>;
export declare type Sink<A, B> = it.Sink<A, B> | it.Duplex<any, A, B>;
export declare function pipe<A>(first: Source<A>): it.Source<A>;

@@ -10,0 +10,0 @@ export declare function pipe<A, B>(first: Source<A>, second: Sink<A, B>): B;

@@ -23,3 +23,5 @@ import { pushable } from 'it-pushable';

if (p.then != null) {
const stream = pushable();
const stream = pushable({
objectMode: true
});
p.then(() => {

@@ -26,0 +28,0 @@ stream.end();

{
"name": "it-pipe",
"version": "2.0.3",
"version": "2.0.4",
"description": "Utility to \"pipe\" async iterables together",
"author": "Alan Shaw",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/alanshaw/it-pipe#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/alanshaw/it-pipe.git"
},
"bugs": {
"url": "https://github.com/alanshaw/it-pipe/issues"
},
"keywords": [
"async",
"await",
"iterable",
"iterator",
"pipe",
"pipeline",
"pull",
"pump",
"stream"
],
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",

@@ -15,2 +40,3 @@ "types": "./dist/src/index.d.ts",

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

@@ -52,11 +78,11 @@ }

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

@@ -91,5 +117,9 @@ },

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

@@ -109,19 +139,22 @@ "section": "Tests"

"scripts": {
"clean": "aegir clean",
"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"
},
"author": "Alan Shaw",
"license": "MIT",
"dependencies": {
"it-merge": "^1.0.4",
"it-pushable": "^3.1.0",
"it-stream-types": "^1.0.3"
},
"devDependencies": {
"aegir": "^36.1.3",
"aegir": "^37.4.8",
"delay": "^5.0.0",

@@ -131,28 +164,4 @@ "it-all": "^1.0.6",

"p-defer": "^4.0.0",
"streaming-iterables": "^6.0.0"
},
"dependencies": {
"it-merge": "^1.0.4",
"it-pushable": "^2.0.0",
"it-stream-types": "^1.0.3"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alanshaw/it-pipe.git"
},
"bugs": {
"url": "https://github.com/alanshaw/it-pipe/issues"
},
"homepage": "https://github.com/alanshaw/it-pipe#readme",
"keywords": [
"pipe",
"pipeline",
"iterable",
"iterator",
"async",
"await",
"stream",
"pump",
"pull"
]
"streaming-iterables": "^7.0.4"
}
}

@@ -1,19 +0,28 @@

# it-pipe
# it-pipe <!-- omit in toc -->
[![Build Status](https://github.com/alanshaw/it-pipe/actions/workflows/js-test-and-release.yml/badge.svg?branch=master)](https://github.com/alanshaw/it-pipe/actions/workflows/js-test-and-release.yml)
[![Dependencies Status](https://david-dm.org/alanshaw/it-pipe/status.svg)](https://david-dm.org/alanshaw/it-pipe)
[![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-pipe.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-pipe)
[![CI](https://img.shields.io/github/workflow/status/alanshaw/it-pipe/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/alanshaw/it-pipe/actions/workflows/js-test-and-release.yml)
> Utility to "pipe" async iterables together
Based on this definition of streaming iterables https://gist.github.com/alanshaw/591dc7dd54e4f99338a347ef568d6ee9.
## Table of contents <!-- omit in toc -->
Almost identical to the [`pipeline`](https://github.com/bustle/streaming-iterables#pipeline) function from the [`streaming-iterables`](https://www.npmjs.com/package/streaming-iterables) module except that it supports duplex streams _and_ will automatically wrap a "source" as the first param in a function.
- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [`pipe(firstFn, ...fns)`](#pipefirstfn-fns)
- [Contribute](#contribute)
- [License](#license)
- [Contribution](#contribution)
## Install
```sh
npm i it-pipe
```console
$ npm i it-pipe
```
Based on this definition of streaming iterables <https://gist.github.com/alanshaw/591dc7dd54e4f99338a347ef568d6ee9>.
Almost identical to the [`pipeline`](https://github.com/bustle/streaming-iterables#pipeline) function from the [`streaming-iterables`](https://www.npmjs.com/package/streaming-iterables) module except that it supports duplex streams *and* will automatically wrap a "source" as the first param in a function.
## Usage

@@ -56,6 +65,5 @@

* `firstFn` may be a `Function` or an `Iterable`
* `firstFn` or any of `fns` may be a [duplex object](https://gist.github.com/alanshaw/591dc7dd54e4f99338a347ef568d6ee9#duplex-it) (an object with a `sink` and `source`).
- `firstFn` may be a `Function` or an `Iterable`
- `firstFn` or any of `fns` may be a [duplex object](https://gist.github.com/alanshaw/591dc7dd54e4f99338a347ef568d6ee9#duplex-it) (an object with a `sink` and `source`).
## Contribute

@@ -67,2 +75,9 @@

[MIT](LICENSE) © Alan Shaw
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.

@@ -30,3 +30,5 @@ import { pushable } from 'it-pushable'

if (p.then != null) {
const stream = pushable<TSource>()
const stream = pushable<TSource>({
objectMode: true
})
p.then(() => {

@@ -52,3 +54,3 @@ stream.end()

export type Transform<A, B> = it.Transform<A, B> | it.Duplex<B, A, any>
export type Sink<A, B> = it.Sink<A, B> | it.Duplex<A, any, B>
export type Sink<A, B> = it.Sink<A, B> | it.Duplex<any, A, B>

@@ -55,0 +57,0 @@ export function pipe<A> (

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