# fsdown

> A Node.js leveldown API implementation that uses fs under the hood

Latest version **2.0.3** (published 2017-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install fsdown
pnpm add fsdown
yarn add fsdown
bun add fsdown
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2017-01-23 |
| First published | 2016-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Nolan Lawson |
| Maintainers | gr2m, nolanlawson |
| Keywords | leveldb, fs, leveldown, levelup |

## Links

- npm: https://www.npmjs.com/package/fsdown
- Repository: https://github.com/nolanlawson/fsdown
- Homepage: https://github.com/nolanlawson/fsdown#readme
- Issues: https://github.com/nolanlawson/fsdown/issues
- npm.io page: https://npm.io/package/fsdown

## Dependencies (9)

- [d64](https://npm.io/package/d64.md) ^1.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [argsarray](https://npm.io/package/argsarray.md) 0.0.1
- [tiny-queue](https://npm.io/package/tiny-queue.md) ^0.2.1
- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.7
- [sanitize-filename](https://npm.io/package/sanitize-filename.md) ^1.6.0
- [abstract-leveldown](https://npm.io/package/abstract-leveldown.md) 0.12.3
- [pouchdb-collections](https://npm.io/package/pouchdb-collections.md) ^6.0.4

## 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

- 2.0.3 (latest) — 2017-01-23
- 2.0.2 — 2016-09-05
- 2.0.1 — 2016-09-03
- 2.0.0 — 2016-09-02
- 1.0.1 — 2016-08-08
- 1.0.0 — 2016-08-07

## README

# fsdown [![Build Status](https://travis-ci.org/nolanlawson/fsdown.svg)](https://travis-ci.org/nolanlawson/fsdown)

Implementation of [leveldown](https://github.com/Level/leveldown) that only has `fs` as a dependency for on-disk storage. Essentially
it uses in-memory JSON objects as the backing store, which are then periodically written to disk.

The intended use case is for very very simple database operations that are not designed for a production environment. Instead the idea
is that `fsdown` should be as simple as possible to install and use, while offering reasonably good durability. In particular,
it doesn't require any native modules, so `npm install fsdown` should be fast and reliable.
Think of it as a compromise between [memdown](https://github.com/level/memdown) and [leveldown](https://github.com/Level/leveldown).

**Note: not intended for production use.** This module contains race conditions which mean that it can
lose data if the process is shut down while a database operation is in progress. Furthermore it has synchronous `fs`
operations, so the performance is not great. Use [leveldown](https://github.com/Level/leveldown) instead if you need something bulletproof.

This project is intended for use with the [level eco-system](https://github.com/level/).

## Install

```
npm install fsdown
```

## Usage

You use this as you would any other "\*DOWN" implementation. Refer to [the leveldown docs](https://github.com/Level/leveldown) for details.

There is an additional configuration offered, which is `directory`. `directory` allows you to specify a directory to write the JSON files to, else
`.fsdown` is used.

```js
var levelup = require('levelup');
var fsdown = require('fsdown');
fsdown.directory = 'my_custom_directory'; // else '.fsdown'
var db = levelup('my_db', {db: fsdown}); // will write to my_custom_directory/my_db.json
```

## Tests

    npm test

This will run tests in Node.

##  Contributors

* [Anton Whalley](https://github.com/no9)
* [Adam Shih](https://github.com/adamshih)
* [Nolan Lawson](https://github.com/nolanlawson)
* [Many more!](https://github.com/nolanlawson/fsdown/graphs/contributors)

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