# hls-streams-terminator

> A writable stream to write hls data to nowhere (/dev/null)

Latest version **0.0.1** (published 2019-06-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hls-streams-terminator
pnpm add hls-streams-terminator
yarn add hls-streams-terminator
bun add hls-streams-terminator
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-06-27 |
| First published | 2019-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kuu Miyazaki |
| Maintainers | kuu |
| Keywords | video, HLS, stream, media |

## Links

- npm: https://www.npmjs.com/package/hls-streams-terminator
- Repository: https://github.com/hls-streams/terminator
- Homepage: https://github.com/hls-streams/terminator#readme
- Issues: https://github.com/hls-streams/terminator/issues
- npm.io page: https://npm.io/package/hls-streams-terminator

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2019-06-27

## README

[![Build Status](https://travis-ci.org/hls-streams/terminator.svg?branch=master)](https://travis-ci.org/hls-streams/terminator)
[![Coverage Status](https://coveralls.io/repos/github/hls-streams/terminator/badge.svg?branch=master)](https://coveralls.io/github/hls-streams/terminator?branch=master)
[![Dependency Status](https://david-dm.org/hls-streams/terminator.svg)](https://david-dm.org/hls-streams/terminator)
[![Development Dependency Status](https://david-dm.org/hls-streams/terminator/dev-status.svg)](https://david-dm.org/hls-streams/terminator#info=devDependencies)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)


# terminator
A writable stream to write hls data to nowhere (/dev/null)

## Features
* Being used with other [`hls-streams`](https://github.com/hls-streams) objects, it provides a functionality to terminate the stream pipeline.

## Install
[![NPM](https://nodei.co/npm/hls-streams-terminator.png?mini=true)](https://nodei.co/npm/hls-streams-terminator/)

## Usage

```js
const {createReadStream} = require('hls-streams-url');
const {createLogger} = require('hls-streams-logger');
const {createTerminator} = require('hls-streams-terminator')

const src = createReadStream('https://foo.bar/sample.m3u8');
const logger = createLogger({
  level: 'detail'
});
const dest = createTerminator();

// Print all playlists/segments to stdout
src.pipe(logger).pipe(dest)
.on('error', err => {
  console.log(err.stack);
});
```
## API
The features are built on top of the Node's [`Writable Stream`](https://nodejs.org/api/stream.html#stream_writable_streams).

### `createTerminator()`
Creates a new `WriteStream` object.

#### params
None

#### return value
An instance of WriteStream.

### `WriteStream`
A subclass of [stream.Writable](https://nodejs.org/api/stream.html#stream_writable_streams) that just ignore every [`hls-parser`](https://github.com/kuu/hls-parser) objects.

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