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-alerts-plus

v0.1.0

Published

Persistent alerts for wickchart — survives reloads via localStorage, desktop notifications + sound while the tab is hidden, optional webhook. Opt-in plugin, zero dependencies.

Readme

wickchart-alerts-plus

The "pro" alert tier for wickchart, as an opt-in plugin — core alerts are runtime-only by design, so persistence, desktop notifications and webhooks live here instead. Zero dependencies.

  • Persistence: the chart's alert list is mirrored into localStorage at save points (adds/removes, fires, sync(), detach()) and re-armed on the next page load. Once-fired alerts drop out of storage automatically; alerts added directly on the chart are picked up too.
  • Hidden-tab surfacing: while the tab is hidden, a fired alert raises a desktop notification (with the user's permission) and a short two-tone WebAudio beep — no audio files, no dependencies.
  • Webhook: an optional URL receives POST { id, price, when, time, bar, key } on every fire, regardless of tab visibility. Fire-and-forget; rejections are swallowed.
npm install wickchart wickchart-alerts-plus   // the plugin is a separate package

import 'wickchart';                              // the chart itself
import { attachAlertsPlus } from 'wickchart-alerts-plus';

const chart = document.querySelector('wick-chart');
const ap = attachAlertsPlus(chart, {
  key: 'BTC:1h',              // storage key — one per symbol+timeframe
  notify: true,               // desktop notification while hidden
  sound: true,                // beep while hidden
  webhook: 'https://example.com/hook', // optional
});
await ap.requestNotify();     // ask for the notification permission once

ap.add({ price: 100, direction: 'above' });   // persisted, re-armed on reload
ap.add({ when: 'rsi(close,14) < 30' });       // scripted alerts persist too
ap.list();                                    // → serializable snapshots
ap.remove(id); ap.clear(); ap.sync(); ap.detach();

Notes:

  • storage and fetch are injectable (tests, SSR, custom backends); without storage the plugin is memory-only and never throws — private mode / quota failures are silently best-effort.
  • Restored alerts re-arm (fired resets): a non-once alert that fired before a reload can fire again after it.
  • Everything on the chart keeps working: addAlert / removeAlert / clearAlerts / getState, wick:alert events, once semantics.

Peer dependency: wickchart ≥ 1.4.0.