# endpoint

> Converts a stream intro a buffer or array of objects

Latest version **0.4.5** (published 2015-11-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install endpoint
pnpm add endpoint
yarn add endpoint
bun add endpoint
```

## 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.4.5 |
| Published | 2015-11-02 |
| First published | 2012-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Andreas Madsen |
| Maintainers | andreasmadsen |
| Keywords | endpoint, stream, buffer, convert, stream2 |

## Links

- npm: https://www.npmjs.com/package/endpoint
- Repository: https://github.com/AndreasMadsen/endpoint
- Homepage: https://github.com/AndreasMadsen/endpoint#readme
- Issues: https://github.com/AndreasMadsen/endpoint/issues
- npm.io page: https://npm.io/package/endpoint

## Dependencies (1)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 0.4.5 (latest) — 2015-11-02
- 0.4.4 — 2015-10-15
- 0.4.3 — 2015-02-25
- 0.4.2 — 2013-05-06
- 0.4.1 — 2013-04-28
- 0.4.0 — 2013-04-27
- 0.3.0 — 2013-04-05
- 0.2.1 — 2013-03-08
- 0.2.0 — 2012-12-22

## README

#endpoint

> Converts a stream intro a buffer or array of objects

## Installation

```sheel
npm install endpoint
```

## Documentation

`endpoint` is a `WriteStream` there converts a stream to a buffer or an array
of object, it also collectes stream errors from the source.

**Collect a buffer stream intro a single buffer:**

```JavaScript
  var endpoint = require('endpoint');

  BufferStream.pipe(endpoint(function (err, buffer) {
    console.log('error:', err);
    console.log('buffer'; buffer);
  }));
```

**Collect an object stream intro an array of object:**

```JavaScript
  var endpoint = require('endpoint');

  ObjectStream.pipe(endpoint({objectMode: true}, function (err, array) {
    console.log('error:', err);
    console.log('array'; array);
  }));
```

In both situations the currently colllected buffer or array of object can be
accesses by `this.buffer`.

##License

**The software is license under "MIT"**

> Copyright (c) 2012 Andreas Madsen
>
> 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/endpoint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
