JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7192
  • Score
    100M100P100Q141562F
  • 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

mypluralize

A promise based Node.js module that converts a node.js ReadStream to buffer

Installation

npm install stream-to-buffer --save

Usage

Javascript

const stb = require('stream-to-buffer');
const readStream = fs.createReadStream("./file");
const buffer = await stb.streamToBuffer(readStream);
Output should be the the content of the file

TypeScript

import { streamToBuffer } from 'stream-to-buffer';
const readStream = fs.createReadStream("./file");
const buffer = await streamToBuffer(readStream);
Output should be the the content of the file

Test

npm run test