# sb-fs

> Promisified fs for Node.js

Latest version **4.0.0** (published 2019-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install sb-fs
pnpm add sb-fs
yarn add sb-fs
bun add sb-fs
```

## 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 | 4.0.0 |
| Published | 2019-04-20 |
| First published | 2016-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8 |
| Dependencies | 1 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | steelbrain |
| Maintainers | steelbrain |
| Keywords | sb, fs, promise |

## Links

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

## Dependencies (1)

- [strip-bom-buf](https://npm.io/package/strip-bom-buf.md) ^1.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

- 4.0.0 (latest) — 2019-04-20
- 3.0.0 — 2017-04-10
- 2.0.0 — 2017-03-02
- 1.1.1 — 2016-09-20
- 1.1.0 — 2016-09-12
- 1.0.0 — 2016-09-10

## README

# FS

`sb-fs` is a Node.js module that exports a promisified FS.

## Installation

```
npm install --save sb-fs
```

## API

```js
export promisifyAll(*) from 'fs'
export function exists(path: string): Promise<boolean>
export function readFile(path: string): Promise<string>
// ^ Returns a BOM stripped string
```

## Usage

```js
import { readFile, exists, createReadStream, createWriteStream } from "sb-fs";

export default async function freedom() {
  console.log(await readFile(__filename));
  console.log(
    (await exists("/path/to/humanity")) ? "it exists!!" : "Naah it doesnt exist"
  );
  createReadStream("source.js").pipe(createWriteStream("target.js"), {
    end: true
  });
}
```

## License

This package is licensed under the terms of MIT License. See the LICENSE file for more info.

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