@jorgeferrero/stream-to-buffer
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

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

Package Sidebar

Install

npm i @jorgeferrero/stream-to-buffer

Weekly Downloads

6,020

Version

2.0.6

License

MIT

Unpacked Size

22.2 kB

Total Files

28

Last publish

Collaborators

  • jorgeferrero