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

@0x1eef/postman

v0.4.0

Published

Delivers the assets of a web page asynchronously

Readme

About

Postman is a lightweight library that can download the assets of a web page asynchronously. A classic use-case might be a progress bar that is updated as assets are downloaded.

Example

Postman

Deliver

The "deliver" method initiates the download of a parcel that includes fonts, stylesheets and scripts. Each time an item is downloaded, the progress event is dispatched. When all items have been downloaded, the parcel is ready to be inserted into the DOM. Typically document.fonts is used to append fonts, document.head is used to append styles, and document.body is used to append scripts:

import { Postman, item } from "postman";

const items = [
  item.font("Roboto Regular", "/fonts/roboto-regular.ttf"),
  item.css("/css/main.css"),
  item.script("/js/main.js")
]

const postman = Postman(...items)
postman.addEventListener("progress", (event) => {
  const { progress, parcel } = event.detail
  console.info("progress", progress)
  if (progress === 100) {
    parcel.fonts.forEach((font) => document.fonts.add(font))
    parcel.css.forEach((style) => document.head.appendChild(style))
    parcel.scripts.forEach((script) => document.body.appendChild(script))
  }
})
postman.deliver()

Error

An "error" event is dispatched when an item fails to download, and that includes any item that was fetched with a response code other than 200. The dispatched event provides access to an instance of AbortController that can be used to cancel the download of the remaining items, otherwise the download will continue:

import { Postman, item } from "postman";

const items = [
  item.font("Roboto Regular", "/fonts/roboto-regular.ttf"),
  item.css("/css/main.css"),
  item.script("/js/main.js")
]

const postman = Postman(...items)
postman.addEventListener("error", (event) => {
  const { controller } = event.detail
  controller.abort()
  console.error("error encountered, download cancelled")
})
postman.deliver()

See also

Sources

License

BSD Zero Clause See LICENSE