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

wickchart-replay

v0.1.0

Published

Bar replay for wickchart — play history forward bar-by-bar or at speed while the future stays hidden. Opt-in plugin, zero dependencies, zero core changes.

Readme

wickchart-replay

Bar replay for wickchart, as an opt-in plugin — the core stays replay-free. Zero dependencies, zero core changes: the whole engine runs on the public data API (setData + update).

Play history forward bar-by-bar or at speed while the future stays hidden. A badge layer shows the mode and position at a glance.

npm install wickchart wickchart-replay   // the plugin is a separate package

import 'wickchart';                        // the chart itself
import { attachReplay } from 'wickchart-replay';

const chart = document.querySelector('wick-chart');
const replay = attachReplay(chart);

replay.start();                 // head defaults to ~70% of the data
replay.start(1772604000000);    // …or a time (ms, seconds, or a date string)
replay.start(42);               // …or a bar index (integer < data length)
replay.step();                  // reveal one bar (step(5) reveals five)
replay.play();                  // 4 bars/sec (default), pause at the end
replay.play(15);                // faster; setSpeed(v) works while playing
replay.pause();
replay.seek('2026-03-06');      // jump the head — also activates when idle
replay.setLoop(true);           // wrap to the anchor instead of pausing
replay.stop();                  // exit — the full dataset is restored
replay.detach();                // …and stop() + remove the layer

// progress readout
chart.addEventListener('wick:replay', (e) => {
  const d = e.detail;
  status.textContent = d.active ? `${d.index + 1}/${d.total}` : '';
});
  • Anchors: start/seek accept a bar index (integer < data length), a timestamp (ms or seconds — anything ≥ 1e9), or a date string; null defaults to ~70% of the data; unresolvable values fall back to the default.
  • State: active, playing, loop, index, total, time, speed getters; every change fires wick:replay with the full snapshot.
  • Loop: setLoop(true) wraps back to the anchor at the end of the data instead of pausing.
  • Live feeds: pause them while replaying. An external update() or setData() during replay means the data moved under the plugin — replay aborts (without restoring) rather than corrupting the chart. The wickchart demo stops its feed automatically when you press Replay.
  • Paper trading and an equity curve are the planned 0.2 follow-up; the replay engine (this package) is intentionally data-only.

Peer dependency: wickchart ≥ 1.4.0.