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 🙏

© 2025 – Pkg Stats / Ryan Hefner

unpm-fs-backend

v0.1.0

Published

static file backend for unpm json data

Downloads

80

Readme

μnpm-fs-backend

Build Status

a static-file backend for μnpm

Example

var backend = require('unpm-fs-backend')

config.backend = backend(metaDir, userDir, tarballsDir)

API

backend(metaDir, userDir, tarballsDir, miscDir) -> Backend

Where metaDir is where to store package metadata, userDir is where to store user data, tarballsDir is where your .tgz files live, and miscDir is where any arbitrary data stored by middleware will go (using Backend.set and Backend.get).

Backend is an Event Emitter with the following methods:

  • getUser(name, done)

Retrieves user data for user name and calls done as a node-style callback (function(err, data))

  • setUser(name, data, done)

Saves user data to name and calls done with node-style callback when complete

User information should be an object of form:

{
    name: String
  , email: String
  , salt: String
  , date: String
  , password_hash: String
}

Emits setUser(name, data, previousData) where previousData is the data name had before being set (null in the case of no previous data).

  • createUserStream(options)

Get a key/value stream of users, options should be of a form matching levelup's createReadStream options.

  • getMeta(name, done)

Get metadata about package name, calls a node-style callback with data.

  • setMeta(name, data, done)

Save package metadata for name and calls a node-style callback when complete.

Emits setMeta(name, data, previousData)

Metadata should be an object that looks like EXAMPLE-META-DATA.json

  • createMetaStream(options)

Get a key/value stream of metadata, options should be of a form matching levelup's createReadStream options.

  • getTarball(name, version) -> ReadableStream

Returns a readable stream of the .tgz file for package name at version.

  • setTarball(name, version) -> WritableStream

Returns a writable stream for a .tgz file for package name at version. The tarball must conform to the specification as outline by npm-install

  • get(key, done)

Get the value of key from the miscellaneous key/value store.

  • set(key, value, done)

Save value to key in the misc. key/value store.

Emits set(key, value, previousValue)

  • createStream(options)

Get a key/value stream for misc. data, options should be of a form matching levelup's createReadStream options.

License

MIT