@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.6
    7,181
    • latest

Version History

Package Sidebar

Install

npm i @jorgeferrero/stream-to-buffer

Weekly Downloads

7,382

Version

2.0.6

License

MIT

Unpacked Size

22.2 kB

Total Files

28

Last publish

Collaborators

  • jorgeferrero