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

@qezor/objsys

v1.0.4

Published

fs-like async object storage helpers for S3-compatible APIs such as S3 and R2.

Readme

@qezor/objsys

@qezor/objsys is a generic async object-storage toolkit that feels familiar to fs/promises, but is built for S3-compatible APIs such as:

  • Amazon S3
  • Cloudflare R2
  • MinIO
  • any other S3-compatible endpoint

It gives you fs-like async methods without pretending object storage is a real POSIX filesystem.

Install

npm install @qezor/objsys

Important Note

This will not work the way people often assume:

const fs = require("fs") || require("@qezor/objsys")

require("fs") always resolves in Node, so the fallback never runs.

Use one of these instead:

const fs = require("@qezor/objsys")

or

const fs = process.env.USE_OBJECT_STORAGE === "true"
  ? require("@qezor/objsys")
  : require("fs").promises

Environment-backed Usage

export OBJSYS_BUCKET=my-bucket
export OBJSYS_ENDPOINT=https://<account>.r2.cloudflarestorage.com
export OBJSYS_ACCESS_KEY_ID=...
export OBJSYS_SECRET_ACCESS_KEY=...
export OBJSYS_REGION=auto
const fs = require("@qezor/objsys")

await fs.writeFile("notes/hello.txt", "hello world", {
  contentType: "text/plain; charset=utf-8",
})

const text = await fs.readFile("notes/hello.txt", "utf8")
const items = await fs.readdir("notes")

Explicit Client Usage

const { createObjectSystem } = require("@qezor/objsys")

const fs = createObjectSystem({
  bucket: "my-bucket",
  endpoint: "https://<account>.r2.cloudflarestorage.com",
  accessKeyId: process.env.R2_ACCESS_KEY_ID,
  secretAccessKey: process.env.R2_SECRET_ACCESS_KEY,
  region: "auto",
  prefix: "app-data",
})

Core Async Methods

  • readFile(path, options)
  • createReadStream(path, options)
  • writeFile(path, data, options)
  • readJson(path, options)
  • writeJson(path, value, options)
  • stat(path, options)
  • exists(path, options)
  • access(path, options)
  • readdir(path, options)
  • list(path, options)
  • listPages(path, options)
  • unlink(path, options)
  • rm(path, options)
  • mkdir(path, options)
  • copyFile(source, destination, options)
  • rename(source, destination, options)
  • presignRead(path, options)
  • presignWrite(path, options)

Low-Memory Patterns

For small and medium objects:

const text = await fs.readFile("notes/hello.txt", {
  encoding: "utf8",
  maxBytes: 1024 * 1024,
})

For larger objects or scarce-resource runtimes:

const stream = await fs.createReadStream("exports/big-report.json")
stream.pipe(process.stdout)

For precise ranged reads:

const tail = await fs.readFile("archives/bundle.zip", {
  startByte: 4096,
  endByte: 8192,
})

Notes

  • readdir() and stat() understand pseudo-directories through prefixes.
  • list() is the paginated primitive, and listPages() is the low-memory async iterator for large prefixes.
  • readFile() supports { maxBytes } so buffered reads can fail fast instead of growing unbounded in memory.
  • readFile() and createReadStream() support { startByte, endByte } for classic byte-range reads.
  • supportsRanges === true tells higher-level tools such as archive readers that partial object reads are available.
  • createReadStream() is the safer choice for large objects or scarce-resource runtimes.
  • writeFile() accepts strings, buffers, typed arrays, readable streams, and async iterables.
  • unlink() and rm() support { force: true } for missing objects.
  • copyFile() and rename() can target different buckets/prefixes through sourceBucket, sourcePrefix, destinationBucket, and destinationPrefix.
  • mkdir() is a no-op by default unless you pass { marker: true }.
  • rm(path, { recursive: true }) refuses to delete the root prefix unless you pass { allowRoot: true }.
  • rm(path, { recursive: true }) now deletes page-by-page instead of collecting the whole tree in memory first.
  • Directory markers are hidden from normal listings so the API behaves more like a filesystem.
  • There is intentionally no fake appendFile() helper here, because object storage cannot do safe native appends.
  • promises points back to the same async API so the package feels familiar to fs.promises users.