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

@keiii/k-stream

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keiii/k-stream

K-Stream is a functional reactive stream library for TypeScript

  • 0.0.43
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Functional reactive stream library for TypeScript

K-Stream is yet another a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code.

npm (scoped) Coverage Status

npm i @keiii/k-stream

Usage

import { ksPeriodic, ksShare, ksFilterMap, ksTake, some, none } from "@keiii/k-stream";

const stream = ksPeriodic(100, ksShare)
  .pipe(ksFilterMap(n => (n % 2 === 0 ? some(n) : none)))
  .pipe(ksTake(10));

stream.subscribe({
  next: console.log,
  complete: () => console.log('complete!'),
});

Create steam from your data source:

const stream = ksShare<MouseEvent>(observer => {
  const handler = (e: MouseEvent) => observer.next(e);
  document.addEventListener('click', handler);
  return { unsubscribe: () => document.removeEventListener('click', handler) };
});

Goals

Keywords

FAQs

Package last updated on 27 Mar 2023

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

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