JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6275
  • Score
    100M100P100Q139554F
  • License MIT

A promise based npm package that converts a node.js ReadStream to buffer

Package Exports

  • @jorgeferrero/stream-to-buffer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jorgeferrero/stream-to-buffer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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