# @jsonjoy.com/fs-node

> In-memory filesystem with Node.js fs-compatible API

Latest version **4.78.0** (published 2026-09-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @jsonjoy.com/fs-node
pnpm add @jsonjoy.com/fs-node
yarn add @jsonjoy.com/fs-node
bun add @jsonjoy.com/fs-node
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.78.0 |
| Published | 2026-09-13 |
| First published | 2026-01-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2091 |
| Author | streamich |
| Maintainers | json-joy-team, streamich |
| Keywords | fs, filesystem, node, virtual, memory, in-memory, memfs |

## Links

- npm: https://www.npmjs.com/package/@jsonjoy.com/fs-node
- Repository: https://github.com/streamich/memfs
- Homepage: https://github.com/streamich/memfs/tree/master/packages/fs-node
- Issues: https://github.com/streamich/memfs/issues
- Funding: https://github.com/sponsors/streamich
- npm.io page: https://npm.io/package/@jsonjoy.com/fs-node

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 4.78.0 (latest) — 2026-09-13
- 4.77.0 — 2026-09-13
- 4.76.0 — 2026-09-12
- 4.75.0 — 2026-09-11
- 4.74.0 — 2026-09-10
- 4.73.0 — 2026-09-10
- 4.72.2 — 2026-09-10
- 4.72.1 — 2026-09-09
- 4.72.0 — 2026-09-09
- 4.71.1 — 2026-09-09
- 4.71.0 — 2026-09-04
- 4.70.0 — 2026-09-04
- 4.69.1 — 2026-09-02
- 4.69.0 — 2026-09-02
- 4.68.2 — 2026-08-29
- … 31 more at https://npm.io/package/@jsonjoy.com/fs-node/versions

## README

# @jsonjoy.com/fs-node

In-memory filesystem with Node.js `fs`-compatible API.

## Installation

```bash
npm install @jsonjoy.com/fs-node
```

## Usage

```ts
import { Volume } from '@jsonjoy.com/fs-node';

const vol = new Volume();
vol.writeFileSync('/hello.txt', 'Hello, World!');
console.log(vol.readFileSync('/hello.txt', 'utf8')); // Hello, World!
```

### Create filesystem from JSON

```ts
import { Volume } from '@jsonjoy.com/fs-node';

const vol = Volume.fromJSON({
  '/app/index.js': 'console.log("Hello");',
  '/app/package.json': '{"name": "app"}',
});

console.log(vol.readdirSync('/app')); // ['index.js', 'package.json']
```

## API

The `Volume` class implements Node.js `fs` module's synchronous and callback APIs:

- `readFile`, `readFileSync`
- `writeFile`, `writeFileSync`
- `mkdir`, `mkdirSync`
- `readdir`, `readdirSync`
- `stat`, `statSync`
- `unlink`, `unlinkSync`
- ... and many more

It also exposes a `promises` property for the Promise-based API:

```ts
const data = await vol.promises.readFile('/hello.txt', 'utf8');
```

## License

Apache-2.0

---
_Source: https://npm.io/package/@jsonjoy.com/fs-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
