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

cover-drive

v1.0.0

Published

Cricket cover drive: loading + boundary celebration — run-up, hit, FOUR! Canvas + CSS, zero dependencies.

Downloads

17

Readme

cover-drive

Cricket “run-up + boundary” for async UX — start() loops the approach, complete() rips a four to the fence. Self-contained CSS + canvas. Zero dependencies.

npm version npm downloads bundle size license TypeScript

Live Demo →


Install

npm install cover-drive

Quick start

import coverDrive from 'cover-drive';

const el = document.getElementById('scene')!;
const match = coverDrive(el, {
  celebrationText: 'SIX!!',
  text: [
    'Ready to bowl.',
    'Run-up…',
    'Delivery…',
    'Worked into the gap…',
    "That's four to the fence!",
  ],
  textInterval: 1800,
});

match.start(); // loop: run-up, ball alive

// when your work resolves:
match.complete();

// new innings
match.reset();

API

coverDrive(container, options?)

| Option | Type | Default | Description | |--------|------|---------|-------------| | scale | number | 1 | Visual scale multiplier (e.g. 0.75, 1.5) | | batterColor | string | #1f5f3a | Batter kit — shirt, pads, legs, helmet, gloves. The ball is always white. | | bowlerColor | string | #1f5f3a | Bowler kit (cap, shirt, legs). | | celebrationText | string | FOUR! | Big ribbon copy | | text | string \| string[] | Ready to bowl. (idle) | Status line under the scene. Pass a string to override the idle / reset line only; other phases keep built-in copy. Pass an array: first = idle + start, last = complete subtitle; middle entries cycle during the loading loop. | | textInterval | number | 2000 | Interval in ms between middle status messages (array mode only). | | surfaceBackground | string | #12171f | Dark field container background; also used as the canvas ground so the border frame matches. | | borderColor | string | rgba(255,255,255,0.08) | Border around the 300×140 scene. | | borderRadius | number \| string | 12 | Corner radius. Pass a number for pixels, or a CSS length (e.g. 0.5rem). |

Status line: With a string, only idle / reset() uses your copy; start(), the loading loop, and complete() keep the built-in lines (and the delayed “what a shot!” line after complete()). With an array, index 0 is idle and the first line when start() runs, indices 1 … length-2 rotate in order every textInterval ms during the loading loop, and index length-1 is the subtitle when complete() runs (the ribbon still uses celebrationText).

| Method | Description | |--------|-------------| | start() | Begin the “over” (loading) loop. | | complete() | Play the boundary + celebration. | | reset() | Clear to idle. | | destroy() | Remove nodes from the container. |


Bundle size: ~2.3 kB minified + gzip (see bundlephobia).

License

MIT © Everything Frontend