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

flyd-connect

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

flyd-connect

Connects the output of one stream to the input of another.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

flyd-connect

Travis npm David David

Connects the output of one stream to the input of another.

Signature

Stream -> Stream -> Stream

Usage

import flyd from 'flyd';
import connect from 'flyd-connect';

const s1 = flyd.stream();
const s2 = s1.map(x => x * 2);

const s3 = flyd.stream();
const s4 = s2.map(x => x + 1);

connect(s2, s3);
// alternatively:
connect(s2).to(s3);

flyd.on((x) => {
  console.log('2x + 1 =', x);
}, s4);

[1, 2, 3, 4, 5]
  .forEach(n => s1(n));

// Output 3
// Output 5
// Output 7
// Output 9
// Output 11

Keywords

flyd

FAQs

Package last updated on 30 Jun 2015

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