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

efterscript

v0.0.7

Published

A memory-safe interpreter compatible with the PostScript language, compiled to WebAssembly: a program in, a PDF out, in the browser or Node.js. Vectors stay vectors, text stays text.

Readme

efterscript

Try it in your browser → The try-it page runs this package; nothing you convert is uploaded.

A memory-safe interpreter compatible with the PostScript language, compiled to WebAssembly: a program in, a PDF out, in the browser or in Node.js. Vectors stay vectors, text stays text, colour spaces are preserved; nothing is rasterised.

The engine is the same Rust code that is published as the efterscript crates, built for wasm32-unknown-unknown with no imports: it cannot reach the network, the file system, or anything else in its host. The package has no dependencies.

Use

import { load } from "efterscript";

const engine = await load();
const result = await engine.convert(`%!PS
/Helvetica findfont 24 scalefont setfont
72 700 moveto (Hello, PDF) show
showpage`);

result.outcome; // "ok", "error", or "budget"
result.pdf;     // Uint8Array holding the document
result.stdout;  // what the program printed

load() fetches efterscript.wasm from beside the module (from the file system under Node.js). Pass a URL, a Response, the bytes, or a compiled WebAssembly.Module to load it from somewhere else; a bundler can resolve efterscript/efterscript.wasm to a URL for you.

Programs arriving in pieces can be fed as they come, which is how a host acting as a printer answers queries while a job is still arriving:

const job = await engine.job({ identity: { product: "(Fictional Press)" } });
job.feed(firstChunk);     // { stdout, stderr, done }
job.feed(secondChunk);
const result = job.finish();
job.free();

Each job runs in a fresh instance of the module, so nothing survives from one job to the next.

Options

| Option | Default | Meaning | |---|---|---| | budget | 100000000 | Objects the program may execute before it stops with the budget outcome; null for no limit. | | identity | {} | statusdict entries, each value as literal text in the PostScript language. | | prelude | none | A program run once at the server level before the job. | | compress | true | Compress page content. | | embedAllFonts | false | Embed every font, the resident ones included. | | serverPassword | 0 | The password exitserver expects. |

The engine runs synchronously inside feed and finish. In a browser, run it in a Web Worker so the page stays responsive, and terminate the worker to cancel a job; engine.module can be posted to the worker and passed to load there.

Licence

MIT for the project's own code. The module contains the resident font set and its data, which carry their own terms; see THIRD-PARTY-NOTICES.md. PDFs produced with these fonts carry no obligation.

PostScript is a registered trademark of Adobe. EfterScript is an independent interpreter compatible with the PostScript language and is not affiliated with or endorsed by Adobe.