New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

pull-redirectable

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-redirectable

Redirectable pull-streams

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
10
-61.54%
Maintainers
1
Weekly downloads
 
Created
Source

pull-redirectable

Redirectable pull-streams

API

  • .source(): Creates a redirectable source
  • .sink(): Creates a redirectable sink
  • .duplex(): Creates a redirectable duplex

Stream API

.changeDest(to): Changes the destination to a or b

Every stream exposes an a and b stream.

The main stream is an inverse of the type (e.g sink => source)

Example

it('moves half the data from a to o and the other half from b', cb => {
  const s = redir.sink()
  let i = 0

  pull(
    pull.values(v.slice(0, 2)),
    pull.map(v => {
      i++
      if (i === 2) s.changeDest('b')
      return v
    }),
    s.a.sink
  )

  pull(
    pull.values(v.slice(2)),
    s.b.sink
  )

  pull(
    s.source,
    pullCompare(v, cb)
  )
})

Keywords

pull-stream

FAQs

Package last updated on 03 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts