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

@zenfs/core

v2.7.6

Published

A filesystem, anywhere

Downloads

2,260,343

Readme

ZenFS

ZenFS is a cross-platform library that emulates the Node.js filesystem API. It works using a system of backends, which are used by ZenFS to store and retrieve data. ZenFS should cover the full API surface of the latest Node.js version, though complex changes may lag a little bit.

Backends

ZenFS is modular and easily extended. The core includes some built-in backends:

  • InMemory: Stores files in-memory. This is cleared when the runtime ends (e.g. a user navigating away from a web page or a Node process exiting)
  • CopyOnWrite: Use readable and writable file systems with copy-on-write.
  • Fetch: Downloads files over HTTP with the fetch API
  • Port: Interacts with a remote over a MessagePort-like interface (e.g. a worker)
  • Passthrough: Use an existing node:fs interface with ZenFS
  • SingleBuffer: A backend contained within a single buffer. Can be used for synchronous multi-threaded operations using SharedArrayBuffer

ZenFS supports a number of other backends. Many are provided as separate packages under @zenfs. More backends can be defined by separate libraries by extending the FileSystem class and providing a Backend object.

You can find all of the packages available over on NPM. Below is a list of the backends included with some of them:

  • @zenfs/archives: Zip, Iso
  • @zenfs/cloud: Dropbox, GoogleDrive, S3Bucket
  • @zenfs/dom: WebAccess (Web File System Access API/OPFS), IndexedDB, WebStorage (localStorage/sessionStorage), XML (DOM elements)
  • @zenfs/emscripten: Emscripten and a plugin for Emscripten's file system API

As an added bonus, all ZenFS backends support synchronous operations. Additionally, all of the backends included with the core are cross-platform.

For more information, see the docs.

Installing

npm install @zenfs/core

If you're using ZenFS, especially for big projects, please consider supporting the project. Thousands of hours have been dedicated to its development. Your financial support would go a long way toward improving ZenFS and its community.

Usage

[!IMPORTANT] Check out the ZenFS docs!

import { fs } from '@zenfs/core'; // You can also use the default export

fs.writeFileSync('/test.txt', 'You can do this anywhere, including browsers!');

const contents = fs.readFileSync('/test.txt', 'utf-8');
console.log(contents);

A single InMemory backend is created by default, mounted on /. To use different backends, and to mount more than one, configure ZenFS with configure. This mounts a zip file to /mnt/zip, in-memory storage to /tmp, and IndexedDB to /home:

import { configure, InMemory } from '@zenfs/core';
import { IndexedDB } from '@zenfs/dom';
import { Zip } from '@zenfs/archives';

const res = await fetch('mydata.zip');

await configure({
	mounts: {
		'/mnt/zip': { backend: Zip, data: await res.arrayBuffer() },
		'/tmp': InMemory,
		'/home': IndexedDB,
	},
});

The fs/promises API is available from @zenfs/core/promises, as the promises export, or as fs.promises.

For the full usage guide, see the documentation. This includes mounting at runtime, contexts and permissions, devices, and the node:*module emulation.

Bundling

ZenFS exports a drop-in for Node's fs module, so you can use it for your bundler of preference using the default export. See COPYING.md for more info.

Sponsors

A huge thank you to deco.cx for sponsoring ZenFS and helping to make this possible.

Contact and Support

You can reach out on Discord or by emailing [email protected]