3.0.7 • Published 3 years ago

streamtoarray v3.0.7

Weekly downloads
32
License
MIT
Repository
github
Last release
3 years ago

streamtoarray

streamtoarray converts streams to arrays.

Status

CategoryStatus
Versionnpm
DependenciesDavid
Dev dependenciesDavid
BuildGitHub Actions
LicenseGitHub

Installation

$ npm install streamtoarray

Quick start

First you need to integrate streamtoarray into your application:

const { toArray } = require('streamtoarray');

If you use TypeScript, use the following code instead:

import { toArray } from 'streamtoarray';

Then you can call toArray with a stream. The stream gets converted and its contents are returned as an array once the stream has ended:

const array = await toArray(stream);

If the stream emits an error event, an exception is thrown, and the partially parsed array is provided as the array property of the exception:

try {
  const array = await toArray(stream);
} catch (ex) {
  console.log(ex.array);

  // ...
}

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter
3.0.7

3 years ago

3.0.4

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.0

8 years ago