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

@ascii-fx/compiler

v0.6.0

Published

Build-time compiler for ASCII FX: deterministic font rasterization, glyph atlases, .asciip/.asciif generation.

Readme

@ascii-fx/compiler

Build-time only: turns a font into a glyph profile the matcher can use, and an image into a precompiled frame. Node, never the browser.

pnpm add -D @ascii-fx/compiler

Most people never import this directly — @ascii-fx/vite wraps it as a plugin, and the runtime packages can compile a profile themselves at startup. Reach for it when you want to compile ahead of time, or in a build that isn't Vite.

import { readFile } from 'node:fs/promises'
import { buildProfile } from '@ascii-fx/compiler'

const font = new Uint8Array(await readFile('GeistMono-Regular.ttf'))
const { profile, binary } = buildProfile({ font, characters: ' .:-=+*#%@' })
await writeFile('public/default.asciip', binary)

Deterministic on purpose

Rasterization is an in-house fixed-point scanline rasterizer over fontkit's glyph outlines — no system rasterizer anywhere in the path. The same font and the same options produce byte-identical .asciip output on macOS, Linux, and CI.

That matters because a profile's fingerprint is what a .asciif frame is validated against. If rasterization drifted between machines, frames compiled on your laptop would be refused by the same code running in CI. Golden-file tests pin it.

Colour glyphs

buildChromaticProfile builds from decoded colour images rather than a font, carrying an RGBA atlas alongside the coverage plane, so the profile still works with the mask-fitting matchers:

import { buildChromaticProfile } from '@ascii-fx/compiler'

const { binary } = buildChromaticProfile({ glyphs: [{ char: '🌊', image }, ...] })

Static frames

buildFrame matches an image at build time and emits .asciif, so the client ships glyph ids instead of doing any matching:

import { buildFrame, decodePng } from '@ascii-fx/compiler'

const { binary } = buildFrame({ profile, image: decodePng(png), columns: 160 })

A frame records the fingerprint of the profile it was built against and refuses to decode against a different one — a stale .asciif fails loudly rather than rendering garbage.

CLI

npx ascii-fx profile build --font GeistMono-Regular.ttf --out default.asciip
npx ascii-fx frame build --image hero.png --profile default.asciip --columns 160 --out hero.asciif
npx ascii-fx inspect default.asciip

License

MIT