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

@screamer-labs/screamer

v2.5.0

Published

WASM build of screamer, a high-performance causal streaming time-series operator library, compiled from the same C++ core as the Python package.

Downloads

1,122

Readme

@screamer-labs/screamer

WASM build of screamer, a high-performance causal streaming time-series operator library. It runs the same C++ core as the Python screamer package, compiled to WebAssembly, in Node.js and the browser.

Install

npm i @screamer-labs/screamer

The package ships a single self-contained WASM module; there is no separate .wasm asset to fetch and no build step on the consumer side.

The WASM module loads asynchronously

Call await ready() once, before constructing any op. Every factory reads the loaded module, so using one beforehand throws.

import { ready, RollingMean } from "@screamer-labs/screamer";

await ready();
const op = RollingMean(3);

Node, bundlers, and the browser

The import above works in Node (18+) and through any bundler (Vite, Next.js, webpack, esbuild), which inlines the embedded-WASM module. In a plain browser with no build step, import from a CDN URL instead (browser use needs 2.2.1 or newer):

<script type="module">
  import { ready, RollingMean }
    from "https://cdn.jsdelivr.net/npm/@screamer-labs/[email protected]/dist/index.js";
  await ready();
  const sma = RollingMean(3);
</script>

Calling an op: four input regimes

An op factory like RollingMean(3) returns a callable. That callable dispatches on its argument's type and preserves the container shape of its input: a scalar in gives a scalar out, a typed array in gives a typed array out, and so on.

import { ready, RollingMean } from "@screamer-labs/screamer";

await ready();

// number -> number, one event at a time (the streaming regime).
const live = RollingMean(3);
live(1); // NaN, window not yet full
live(2); // NaN
live(3); // 2

// Float64Array -> Float64Array, container-preserving.
const fa = RollingMean(3)(new Float64Array([1, 2, 3, 4, 5]));
// Float64Array [ NaN, NaN, 2, 3, 4 ]

// number[] -> number[], container-preserving.
const arr = RollingMean(3)([1, 2, 3, 4, 5]);
// [ NaN, NaN, 2, 3, 4 ]

// async iterable -> async iterable, yielding one output per input event.
async function* events() {
  for (const v of [1, 2, 3, 4, 5]) yield v;
}
const out = [];
for await (const y of RollingMean(3)(events())) out.push(y);
// [ NaN, NaN, 2, 3, 4 ]

Each op instance is stateful and owns WASM-side memory. Call .dispose() when done with it (live.dispose() above), rather than waiting on garbage collection.

Composing a pipeline

Input declares a named placeholder; passing it through op factories builds a symbolic graph without running anything. Pipeline compiles that graph once and returns a reusable function you call on stored data.

import { ready, Input, Pipeline, RollingMean, Diff } from "@screamer-labs/screamer";

await ready();

const x = Input("x");
const y = Diff(1)(RollingMean(3)(x));
const pipeline = new Pipeline([x], [y]);

const { values, index } = pipeline([1, 2, 3, 4, 5, 6]);

pipeline.dispose();

pipeline(feeds) binds the declared inputs to data and runs the compiled graph in one pass, so a multi-op chain does not recompute shared subgraphs. pipeline.live() returns an event-by-event driver for streaming input; see the type definitions for its push/advance/flush/result methods.

Parity with Python

This package is the JS/WASM build of the Python screamer package: same operators, same causal semantics, same numerics. Its outputs are verified against the Python package's outputs, and batch and streaming calls on the same data give identical results.

Live demo

Watch the live trade dashboard in the browser: screamer-labs.github.io/screamer/live-trades.html. It shows low-lag price, volume-weighted fair value, order-flow pressure, and an optional VPIN view. The self-contained source is examples/live-trades.html.

Learn more

The live dashboard includes a local/UTC time selector and replays a bounded recent-trade buffer when its view or signal changes.

The JavaScript reference and guide are at screamer-labs.github.io/screamer. Full documentation, the function reference, and example notebooks are at screamer.readthedocs.io. Source and issues live at github.com/screamer-labs/screamer.