npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gridstorm/dataflow-core

v0.3.3

Published

DataFlow core engine — streaming pipeline, adapters, anomaly detection

Downloads

221

Readme

@gridstorm/dataflow-core

Zero-dependency streaming engine for real-time data feeds — the core of the DataFlow platform.

~79 KB gzipped · TypeScript · MIT · Browser-only

Install

npm install @gridstorm/dataflow-core

Quick Start

import { StreamingEngine } from '@gridstorm/dataflow-core';

const engine = new StreamingEngine(
  {
    adapter: {
      type: 'websocket',
      url:  'wss://data.example.com/feed',
      reconnectBaseMs: 500,
      heartbeatMs:     15000,
    },
    backpressure: { maxBufferSize: 5000, targetFps: 30 },
    anomaly:      { enabled: true, methods: ['zscore', 'iqr'] },
  },
  {
    onRows:    (rows, changes) => console.log('Live rows:', rows.length),
    onAnomaly: (events)        => console.warn('Anomaly:', events),
    onStatus:  (status)        => console.log('Status:', status),
    onMetrics: (metrics)       => console.log('Throughput:', metrics.rowsPerSecond),
  },
);

engine.start();
// engine.pause() / engine.resume() / engine.stop() / engine.destroy()

Try without a backend

The simulated adapter generates realistic streaming data (seeded PRNG, GBM for financial) — perfect for prototyping and tests:

const engine = new StreamingEngine({
  adapter: {
    type:           'simulated',
    scenario:       'financial',   // 'financial' | 'crypto' | 'iot' | 'ecommerce' | 'logs' | 'social'
    entityCount:    20,
    tickIntervalMs: 400,
    seed:           42,            // reproducible
  },
}, { onRows: (rows) => console.log(rows) });

engine.start();

Features

  • 5 adapters — WebSocket (reconnect + heartbeat + auth), SSE, HTTP polling (fixed / adaptive / long-poll), WebTransport (HTTP/3), Simulated
  • rAF backpressure — bounded ring buffer + frame-rate scheduler with oldest / newest / sample drop strategies
  • Cell change tracking — per-cell direction (↑↓), % change, and timestamp diffs
  • Anomaly detection — Z-score, IQR (Tukey fences), MAD, and static threshold per column; rolling window with minSamples warm-up and severity tiers
  • Sustained-anomaly detection — run-length and burst patterns (built into the engine)
  • Schema auto-inference — detects number / boolean / timestamp / currency / percentage / string from live samples
  • Time-travel replayStreamRecorder + ReplayPlayer with seek, step, 0.1×–16× speed, loop mode
  • Multi-stream joinjoinStreams (inner / left / outer) and N-way mergeStreams
  • TTL eviction — delta state for stale row IDs is automatically reaped (60 s TTL) so log-style streams don't leak memory

Adapter config (all 5)

// WebSocket
{ type: 'websocket', url, authToken?, reconnectBaseMs?, reconnectMaxMs?, heartbeatMs?, maxRetries?, messageToRow? }

// SSE
{ type: 'sse', url, withCredentials?, authToken?, reconnectBaseMs?, messageToRow? }

// HTTP polling
{ type: 'http-polling', url, strategy: 'fixed' | 'adaptive' | 'long-poll', intervalMs?, minIntervalMs?, maxIntervalMs?, authToken?, extractRows? }

// WebTransport (HTTP/3)
{ type: 'webtransport', url, fallbackUrl?, serverCertificateHashes? }

// Simulated
{ type: 'simulated', scenario, entityCount?, tickIntervalMs?, anomalyRate?, seed? }

Advanced primitives

import {
  joinStreams, mergeStreams,         // multi-stream join (SQL-style)
  StreamRecorder, ReplayPlayer,      // time-travel replay
  inferSchema, SchemaInferrer,       // schema auto-inference
  detectBestTransport,               // WebTransport → WS fallback helper
} from '@gridstorm/dataflow-core';

Framework adapters

Links

License

MIT © Tekivex