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

@bandf/fs

v1.2.0

Published

Named-mount virtual filesystem for local, S3, and mirror storage.

Readme

@bandf/fs

Named-mount virtual filesystem for local, S3, and mirror storage.

import { homedir } from 'node:os';
import { join } from 'node:path';
import { openFs } from '@bandf/fs';

const fs = await openFs({
    s3: { region: `us-east-1` }
});
await fs.mount({ name: `docs`, type: `local`, path: join(homedir(), `Documents`), mode: `rw` });
await fs.mount({ name: `archive`, type: `s3`, bucket: `my-bucket`, prefix: `docs/`, mode: `rw` });

const listing = await fs.ls({ address: `docs:**/*.md` });
const file = await fs.read({ address: `docs:notes/plan.md` });
// file is a VFile: file.value, file.path, file.data.fs = { mount, address, mode, ... }

What it is

  • Mounts: lowercase names mapped to local, s3, or mirror storage, each read-only (ro) or read-write (rw). The durable mount table lives at ~/.bandf/fs/mounts.json (BANDF_HOME aware). Session mounts can also be supplied programmatically.
  • Addresses: mount:relative/path. The relative part is normalized and jailed: no .. segments, no absolute injection, no backslashes. An empty relative part is the mount root. URL schemes (http, https, file, ...) are reserved mount names, so an address can never be confused with a URL.
  • Records: read() returns a vfile with the mount provenance stamped on data.fs ({ mount, address, relative, mode, bytes, mtimeMs, encoding }). Writes accept a VFile, { value }, string, or Buffer.
  • S3: pass AWS S3 client config as s3 when calling openFs() or createFs(). Mounts supply the bucket and prefix.
  • Mirror: mirror mounts commit after local and S3 both succeed. Reads, listing, and stat use local.

Mount Types

const fs = await openFs({
    s3: { region: `us-east-1` }
});

await fs.mount({
    name: `docs`,
    type: `local`,
    path: join(homedir(), `Documents`),
    mode: `rw`
});

await fs.mount({
    name: `archive`,
    type: `s3`,
    bucket: `my-bucket`,
    prefix: `docs/`,
    mode: `rw`
});

await fs.mount({
    name: `docsMirror`,
    type: `mirror`,
    mode: `rw`,
    local: { path: join(homedir(), `Documents`) },
    s3: { bucket: `my-bucket`, prefix: `docs/` }
});

API

| Call | Returns | | --- | --- | | openFs({ configPath?, issues?, s3? }) | instance with every persisted mount attached; bad entries land in issues | | createFs({ mounts?, configPath?, issues?, s3? }) | instance from a programmatic mount table | | mounts() / getMount({ name }) | mount records with type, mode, persisted, and backend fields | | mount({ name, type, ...options, mode, persist }) | attach storage; persist writes the config | | unmount({ name, persist }) | detach; persist removes it from the config | | resolve({ address }) | local mounts return path; S3 and mirror mounts return bucket and key | | exists({ address }) / stat({ address }) | storage metadata; local final symlinks can be reported | | ls({ address, glob?, limit? }) | { mount, entries, truncated }; entries carry addresses | | read({ address, encoding? }) | VFile (encoding: null for a Buffer value) | | write({ address, file\|value, encoding?, makeParents? }) | { address, bytes, created, path?, bucket?, key? }; rw mounts only | | remove({ address }) | rw only; refuses the mount root | | copy({ from, to, overwrite? }) | source any mode, destination rw | | move({ from, to, overwrite? }) | both ends rw |

Security posture

The jail rejects .. and absolute path escapes. Local mounts reject symlinks for file operations. Enumeration never follows symbolic links and skips dotfiles.

Config

The s3 option is passed to new S3Client(s3). Use it for AWS client values such as region, credentials, endpoint, and forcePathStyle.

~/.bandf/fs/mounts.json, created when missing:

{
    "version": 1,
    "mounts": {
        "bandf": { "type": "local", "path": "/Users/you/.bandf", "mode": "ro" }
    }
}

Writes are atomic (tmp + rename, mode 600) and preserve unknown keys. A corrupt file throws and is never overwritten.