# fs-source

> A file system source for the BOB streaming protocol.

Latest version **0.0.5** (published 2020-01-08) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2020-01-08 |
| First published | 2018-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jeremiah Senkpiel |
| Maintainers | fishrock123 |
| Keywords | BOB, bob, streams, stream, pull, fs, source, file, file system |

## Links

- npm: https://www.npmjs.com/package/fs-source
- Repository: https://github.com/Fishrock123/fs-source
- Homepage: https://github.com/Fishrock123/bob
- Issues: https://github.com/Fishrock123/fs-source/issues
- npm.io page: https://npm.io/package/fs-source

## Dependencies (1)

- [bob-streams](https://npm.io/package/bob-streams.md) ^0.4.2

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

- 0.0.5 (latest) — 2020-01-08
- 0.0.4 — 2019-07-15
- 0.0.3 — 2018-10-05
- 0.0.2 — 2018-06-29
- 0.0.1 — 2018-06-28
- 0.0.0 — 2018-06-01

## README

# FS Source (BOB)

A file system source for the [BOB](https://github.com/Fishrock123/bob) streaming protocol.

## Usage

```js
const FileSource = require('fs-source')
new FileSource(path, options)
```

Implements a [BOB source](https://github.com/Fishrock123/bob/blob/master/reference-source.js) from files.

### Example

```js
const FileSource = require('fs-source')

const source = new FileSource('my-file')
const sink = new MyBOBSink()

sink.bindSource(source, error => {
  if (error)
    console.error('Stream returned error ->', error.stack)
  else {
    console.log('ok')
  }
})
```

See [test-basic](test/test-basic) for a good working example.

## License

[MIT Licensed](license) — _[Contributions via DCO 1.1](contributing.md#developers-certificate-of-origin)_

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