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 🙏

© 2024 – Pkg Stats / Ryan Hefner

npm-cdn

v2.0.0

Published

A webservice that dishes out files from npm packages

Downloads

32

Readme

npm-cdn

A webservice that dishes out files from npm packages.

npm-cdn downloads tarballs from the npm registry and stores them on disk. First-time requests for a package are slow because the entire package tarball has to be fetched, but subsequent requests for files in the same package should be pretty fast.

Caveat npmtor: This is a proof of concept app. It works, but it's experimental. It's running on a single Heroku dyno so it won't scale. To become a real thing it will need to sit behind a CDN.

Usage

To access a file inside a published npm package, use the following pattern:

https://npm-cdn.herokuapp.com/{packageName}@{packageVersion}/{filePath}

Examples:

Indexes

When a package is downloaded, index files are generated in HTML and JSON format.

  • /[email protected] renders an HTML page with links to all the files in the package.
  • /[email protected]/?json returns a JSON array of all the files in the package. You can also set an application/json Accept header in the request instead of using the json query param.

Redirects

If you request a package without specifying a version, you'll be redirected to the index for the latest version of the package:

Tests

npm install
npm test

Dependencies

  • request: Simplified HTTP request client.
  • restify: REST framework
  • tar-fs: filesystem bindings for tar-stream

Dev Dependencies

  • mocha: simple, flexible, fun test framework
  • nixt: Simple and powerful testing for command-line apps
  • nodemon: Simple monitor script for use during development of a node.js app.
  • rimraf: A deep deletion module for node (like rm -rf)

License

ISC

Generated by package-json-to-readme