# @zthun/dalmart-fs

> A database interface that just uses the file system

Latest version **1.6.14** (published 2026-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zthun/dalmart-fs
pnpm add @zthun/dalmart-fs
yarn add @zthun/dalmart-fs
bun add @zthun/dalmart-fs
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.6.14 |
| Published | 2026-10-14 |
| First published | 2024-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 43.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anthony Bonta |
| Maintainers | zthun |

## Links

- npm: https://www.npmjs.com/package/@zthun/dalmart-fs
- Repository: https://github.com/zthun/dalmart
- Homepage: https://github.com/zthun/dalmart#readme
- Issues: https://github.com/zthun/dalmart/issues
- npm.io page: https://npm.io/package/@zthun/dalmart-fs

## Dependencies (5)

- [glob](https://npm.io/package/glob.md) ^13.0.6
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.18.1
- [@zthun/dalmart-db](https://npm.io/package/@zthun/dalmart-db.md) ^1.6.14
- [@zthun/helpful-fn](https://npm.io/package/@zthun/helpful-fn.md) ^11.0.0
- [@zthun/helpful-query](https://npm.io/package/@zthun/helpful-query.md) ^11.0.0

## Recent versions

- 1.6.14 (latest) — 2026-10-14
- 1.6.13 — 2026-10-01
- 1.6.12 — 2026-08-25
- 1.6.11 — 2026-08-10
- 1.6.10 — 2026-05-26
- 1.6.8 — 2026-04-26
- 1.6.7 — 2026-04-01
- 1.6.6 — 2026-01-31
- 1.6.5 — 2026-01-04
- 1.6.4 — 2026-01-03
- 1.6.3 — 2025-12-14
- 1.6.2 — 2025-10-29
- 1.6.1 — 2025-10-23
- 1.6.0 — 2025-10-19
- 1.5.6 — 2025-10-04
- … 14 more at https://npm.io/package/@zthun/dalmart-fs/versions

## README

# Dalmart File System

This package implements Dalmart databases using JSON files on the file system.
It is best suited to small datasets and simple storage needs.

`ZDatabaseJsonFile` stores key-value pairs in a single JSON file.
`ZDatabaseJsonFolder` stores documents in collection subfolders, with one JSON
file per document named after its `_id`. It supports filtering, sorting, and
pagination, but does not support collection joins.

Set the `url` option to a file system path for either implementation.

## Installation

Install with npm or Yarn:

```sh
npm install @zthun/dalmart-fs
yarn add @zthun/dalmart-fs
```

## Usage

```ts
import type { IZDatabaseDocument, IZDatabaseMemory } from "@zthun/dalmart-db";
import { ZDatabaseOptionsBuilder } from "@zthun/dalmart-db";
import { ZDatabaseJsonFile, ZDatabaseJsonFolder } from "@zthun/dalmart-fs";

let options = new ZDatabaseOptionsBuilder()
  .url("/path/to/database.json")
  .build();
const memory: IZDatabaseMemory = new ZDatabaseJsonFile(options);

options = new ZDatabaseOptionsBuilder().url("/path/to/database-folder").build();
const document: IZDatabaseDocument = new ZDatabaseJsonFolder(options);

// Do things with document and memory.
```

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