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

@debuffjp/assets

v0.24.1

Published

Manifest-driven asset loader with preload groups for debuff

Readme

@debuffjp/assets

Runtime loader for the manifest that debuff generates from your project's assets/ folder. No dependencies.

import { Assets } from "@debuffjp/assets";
import { Sprite } from "@debuffjp/core";

const assets = new Assets(await (await fetch("assets/manifest.json")).json());
await assets.load("default", ({ loaded, total }) => showProgress(loaded / total));

const hero = new Sprite({ frames: assets.frames("hero") }); // [email protected], sliced on its grid
draw.sprite(assets.frame("coin"), x, y); // any image, atlased or not

Conventions (from the asset compiler)

| File | Asset id | Group | | --- | --- | --- | | assets/logo.png | logo | default | | assets/level1/map.json | level1/map | level1 | | assets/[email protected] | hero (grid 16x24) | default |

API

  • load(groups?, onProgress?): preload one or more groups
  • fetch(id): lazy-load a single asset; concurrent calls share one request
  • frame(id): { image, x, y, w, h } for draw.sprite; works for atlased and standalone images
  • frames(id): sprite-sheet frames from the name@WxH grid
  • image(id) (standalone images only), json(id), audio(id), text(id), entry(id), has(id)

Typed asset ids

debuff dev, debuff build and npx debuff assets write .debuff/assets.d.ts, which fills the AssetRegistry interface with every asset id, its type and its group. Include that file in tsconfig.json and a misspelt id, an id of the wrong type or an unknown group is a compile error. Without it, ids are plain strings (as before 0.22). AssetId<"image"> and AssetGroup are exported for your own signatures.

Atlases

The CLI packs PNGs into atlases per preload group, in dev and in builds, so a level loads one texture instead of dozens. It's lossless, with padding that prevents edge bleeding. Images over half the atlas size stay standalone. Configure or disable it in debuff.config.ts:

export default defineConfig({ assets: { atlas: { maxSize: 2048, padding: 2, exclude: ["ui/"] } } }); // or atlas: false
  • Errors are AssetError with the asset id and a suggested fix