# stream-build

> introduce a convenient way to create basic custom streams

Latest version **0.1.3** (published 2014-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install stream-build
pnpm add stream-build
yarn add stream-build
bun add stream-build
```

## 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.1.3 |
| Published | 2014-02-14 |
| First published | 2013-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gregor Elke |
| Maintainers | greelgorke |
| Keywords | stream, factory, inline, build |

## Links

- npm: https://www.npmjs.com/package/stream-build
- Repository: http://github.com/greelgorke/stream-build
- Homepage: https://github.com/greelgorke/stream-build
- Issues: https://github.com/greelgorke/stream-build/issues
- npm.io page: https://npm.io/package/stream-build

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2014-02-14
- 0.1.2 — 2013-05-02
- 0.1.1 — 2013-05-02
- 0.1.0 — 2013-05-02

## README

# Stream-build

this package offers you convenience factory methods for simpler creation of custom streams from the 4 base streams.

[![Build Status](https://travis-ci.org/greelgorke/stream-build.png?branch=master)](https://travis-ci.org/greelgorke/stream-build)

## Usage

Core stream module is re-exported. So you can easy replace `require('stream')` with `require('stream-build')` and go on. Now you have 4 factory methods which can be used to create custom streams:

```javascript
// Before
function MyReadable(opts){
  //this and that
}

util.inherit(MyReadable,Readable)

MyReadable.prototype._read = function(size){
  //custom read code
}

var myReadable = new MyReadable()
```


```javascript
// after

var myReadable = streamBuild.readable( function(size){
  //custom read code
}, {/* options here are passed to core constructors */})
```

## Install

`npm install stream-build`

## About Performance

the builder provided here do not use constructors or inheritance. This package aims for readability, so if you worry about performance:

1. Measure
2. eliminate bottlenecks

Creating a constructor function and using it as in the before-example may give you some bit better performance, since v8 uses such structures for optimization considerations. It's your choice then.

## License

MIT (see license file)

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