# fs-pipe

> a promise base file pipe system

Latest version **1.0.6** (published 2017-02-22) · ISC license · 0 weekly downloads

## Install

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

## 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 | 1.0.6 |
| Published | 2017-02-22 |
| First published | 2017-02-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | slashhuang |
| Maintainers | slashhuang |
| Keywords | fs, node, pipe |

## Links

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

## 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.0.6 (latest) — 2017-02-22
- 1.0.5 — 2017-02-22
- 1.0.4 — 2017-02-21
- 1.0.0 — 2017-02-20

## README

# fs-pipe

> a Promise based file stream work flow

> if you are familiar with gulp

> you will find fs-pipe very useful to you to handle file IO


## install

```bash
    npm install fs-pipe
```

## soure code
[fs-pipe](./babel/index.js)

## usage case

```javascript
    const path = require('path');
    import FsPiper from 'fs-pipe';
    const inst =   new FsPiper();
    let getFile = (...name)=> path.resolve.apply(null,[process.cwd(),...name])
    let sourceStream = getFile(".babelrc");
    let destStream1 = getFile("example","hello");
    let destStream2 = getFile("example","hello1");
    let emptyStream = getFile("test","readme.md");
    let callback = ()=>console.log("stream done")
    inst.src(sourceStream,callback)
         .pipe(destStream1,callback) // write stream
         .pipe(destStream2,callback) // write stream
         .empty(emptyStream,callback) // empty file
         .final(()=>console.log('file stream done')); // final callback

```

## changeLog

- v1.0.6
> Add callback for pipe/src/empty to detailize stream detection
> [使用代码](./test/v1.0.5-test.js)

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