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

chigura2

v0.1.0

Published

A tiny TypeScript widget that puts a pixel cat inside your web page.

Readme

chigura2

chigura2 is a tiny TypeScript widget that puts a pixel cat inside your web page. The cat wanders around, changes poses, and reacts to clicks.

Features

  • Small browser widget with no runtime dependencies
  • Eight built-in cat breeds
  • Adjustable display scale and movement speed
  • Cats responds when clicked.

Installation

npm install chigura2

Quick Start

import { Chigura } from "chigura2";

const field = document.createElement("div");
field.style.position = "relative";
field.style.width = "600px";
field.style.height = "400px";

document.body.appendChild(field);

const chigura = new Chigura({
  breed: "mike",
  scale: "l",
  speed: "fast",
  balloonTexts: ["meow", "snack", "purr..."],
});

await chigura.mount(field);

mount() appends a canvas element and a balloon div to the target element. unmount() removes them and stops all animation.

Options

You can pass the following options to new Chigura(options).

| Name | Type | Default | Description | | --- | --- | --- | --- | | breed | "buchi" \| "hachi" \| "kuro" \| "mike" \| "saba" \| "sabi" \| "shiro" \| "tora" | "buchi" | Selects the cat breed | | scale | "s" \| "m" \| "l" \| "xl" | "m" | Sets the display scale | | speed | "slow" \| "normal" \| "fast" \| "faster" | "normal" | Controls how often the cat moves | | reactions | readonly (ReactionName \| ReactionCallback)[] | Built-in reactions | Built-in reactions or custom callbacks used when the cat is clicked | | balloonTexts | readonly string[] | Built-in meow phrases | Candidate texts shown in the speech balloon |

API

new Chigura(options?)

Creates a new cat widget instance.

await chigura.mount(parent)

Mounts the widget into the given element and starts animation.

  • parent must be an HTMLElement
  • The widget uses parent.clientWidth and parent.clientHeight as its movement bounds
  • Multiple Chigura instances can be mounted into the same container

chigura.unmount()

Stops animation and removes DOM nodes created by the widget.

Exports

You can import the following from the package root:

import {
  Chigura,
  type BreedName,
  type ChiguraOptions,
  type ReactionCallback,
  type ReactionContext,
  type ReactionName,
  type ScaleName,
  type SpeedName,
} from "chigura2";

Demo

A simple demo lives in demo/index.html.

Notes

  • chigura2 is designed for browsers and depends on DOM APIs
  • Custom reaction callbacks receive { position, size }