npm.io
2.0.6 • Published 5 years ago

@jorgeferrero/stream-to-buffer

Licence
MIT
Version
2.0.6
Deps
0
Size
22 kB
Vulns
0
Weekly
0
Stars
12

Stream To Buffer

Build Status Maintainability Test Coverage npm npm (scoped)

A promise based Node.js package that converts a Node.js Readable to buffer

Installation

npm i @jorgeferrero/stream-to-buffer

Usage

import { streamToBuffer } from '@jorgeferrero/stream-to-buffer';
import * as fs from 'fs';

const data = await streamToBuffer(fs.createReadStream('./file'));
console.log(data.toString());
Output should be the the content of the file

Test

npm run test

Keywords