# @ianwalter/fs

> A Proxy over Node's fs module to make it Promise-based and add events

Latest version **1.1.0** (published 2019-03-10) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @ianwalter/fs
pnpm add @ianwalter/fs
yarn add @ianwalter/fs
bun add @ianwalter/fs
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-03-10 |
| First published | 2019-03-10 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ian Walter |
| Maintainers | ianwalter |
| Keywords | fs, filesystem, promise, async, await, then |

## Links

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

## Dependencies (1)

- [@ianwalter/subpub](https://npm.io/package/@ianwalter/subpub.md) ^2.0.0

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

- 1.1.0 (latest) — 2019-03-10
- 1.0.0 — 2019-03-10

## README

# @ianwalter/fs
> A Proxy over Node's fs module to make it Promise-based and add events

[![npm page][npmImage]][npmUrl]

## Features

1. Use Promises and/or async/await with fs methods, e.g.:
   ```js
   const text = await fs.readFile('./top-secret.txt')
   ```
2. Subscribe to filesystem events from anywhere, e.g.:
   ```js
   fs.sub('./top-secret.txt', action => {
     console.log(action.method, action.args)
   })
   ```
3. Control async filesystem events through subscriptions, e.g.:
   ```js
   fs.sub('./top-secret.txt', async action => {
     if (action.method === 'writeFile') {
       throw new Error('How dare you!? You have no write!')
     }
   })
   ```

## Installation

```console
yarn add @ianwalter/fs
```

## License

Apache 2.0 with Commons Clause - See [LICENSE][licenseUrl]

&nbsp;

Created by [Ian Walter](https://iankwalter.com)

[npmImage]: https://img.shields.io/npm/v/@ianwalter/fs.svg
[npmUrl]: https://www.npmjs.com/package/@ianwalter/fs
[licenseUrl]: https://github.com/ianwalter/fs/blob/master/LICENSE

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