# filter-out-stream

> A stream that filters out data, or updates it, optionally to a limit kept, optionally consuming as much as possible past limit until another to keep is encountered.

Latest version **0.0.1** (published 2013-01-16) · 0 weekly downloads

## Install

```sh
npm install filter-out-stream
pnpm add filter-out-stream
yarn add filter-out-stream
bun add filter-out-stream
```

## 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.1 |
| Published | 2013-01-16 |
| First published | 2013-01-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | beaucoo |
| Keywords | stream, filter, out, update, limit, consume |

## Links

- npm: https://www.npmjs.com/package/filter-out-stream
- Repository: https://github.com/beaucoo/filter-out-stream
- Issues: https://github.com/beaucoo/filter-out-stream/issues
- npm.io page: https://npm.io/package/filter-out-stream

## Dependencies (1)

- [through](https://npm.io/package/through.md) 2.1.0

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2013-01-16

## README

#FilterOutStream

A stream that filters out data, or updates it, optionally to a limit kept, optionally consuming as much as
possible past limit until another to keep is encountered.

Install via <code>npm install filter-out-stream</code>

Properties:

* **filteredInCount** tracks the number of items kept.
* **lastItem** is the last item inspected.

<pre>
// Example (see tests for more):
<code>
var filterOutStream = require('filter-out-stream');
var s = filterOutStream(function(item) { return item.key === "SOME_VALUE"; }, 10, true);
s.on('data', function(item) {
  console.log(item);
});
s.on('end', function() {
  console.log("filteredInCount: %d, lastItem: %j", s.filteredInCount, s.lastItem);
});

// Then with some data stream
dataStream.pipe(s);
</code>
</pre>

##Release Notes
v0.0.1 First

##Use Cases
Filter data out of the stream i.e. discard it. Optionally, consume as much as possible without exceeding the limit.
This is useful when receiving data from a broad query and wanting to capture details for retrieving
the next page of data in a future request.

##Running Tests

* Run 'npm test'
* or run `mocha test --require should --reporter spec --recursive`

##License
(The MIT License)

Copyright (c) 2013-20* BeauCoo Technologies Inc. <info@beaucoo.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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