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

@framesieve/adapters

v1.0.0

Published

Capture sources (electron, browser, node) plus recorder and replay for framesieve.

Readme

@framesieve/adapters

Capture sources (browser, electron, node) plus the recorder and the pure replay function for framesieve. The gate itself never touches a clock or the filesystem; everything environment-specific lives here.

npm install framesieve @framesieve/adapters

Three entry points, one per environment. Each ships ESM and CommonJS.

Feeding still images

If you already hold decoded pixels, wrap them as a FrameInput and push. The core frameFromImageData covers a raw ImageData; these adapters add the source-specific decoders.

// browser: an ImageBitmap or an image URL (data:, blob:, http)
import { frameFromBitmap, frameFromDataUrl } from "@framesieve/adapters/browser";
gate.push(frameFromBitmap(bitmap, elapsedMs));
gate.push(await frameFromDataUrl(pngDataUrl, elapsedMs));

// node: a PNG buffer (file read, screenshot lib, nativeImage.toPNG())
import { frameFromPngBuffer } from "@framesieve/adapters/node";
gate.push(frameFromPngBuffer(pngBuffer, elapsedMs));

// electron main: a desktopCapturer thumbnail / nativeImage (BGRA -> RGBA)
import { frameFromNativeImage } from "@framesieve/adapters/electron";
const [src] = await desktopCapturer.getSources({
  types: ["screen"],
  thumbnailSize: { width: 1920, height: 1080 },
});
gate.push(frameFromNativeImage(src.thumbnail, elapsedMs));

frameFromNativeImage and the electron entry pull no node builtins, so the entry is safe to load in a renderer too; the node entry (recorder, PNG codec) is main-process/node only.

Streaming capture

import { captureDisplay } from "@framesieve/adapters/browser";
const source = await captureDisplay(); // prompts for a screen share
setInterval(async () => gate.push(await source.grab()), 500);

For Electron, desktopSourceConstraints(sourceId) builds the getUserMedia constraints for a chosen desktopCapturer source; wrap the resulting stream with createElectronSource.

Record and replay

The recorder taps a gate and writes frames plus the decision timeline to a directory; replay re-runs a recording through a fresh gate as a pure function of (recording, options). This is what fsieve replay and --sweep are built on.

import { createRecorder, replay } from "@framesieve/adapters/node";

See the main repository README for the tuning workflow.