sb-stream-promise

2.0.0 • Public • Published

Stream-Promise

Stream-Promise is a Node.js stream to Promise conversion module.

Installation

npm install --save sb-stream-promise

API

export default function createdefaultPromise(stream: Stream, bytesLimit: ?number)

Example

const FS = require('fs')
const createStreamPromise = require('sb-stream-promise')
 
createStreamPromise(FS.createReadStream(`/etc/passwd`))
  .then(function(contents) {
    console.log(contents)
  })
  .catch(function(error) {
    console.error('unable to read file', error)
  })

License

This project is licensed under the terms of MIT License. See the LICENSE file for more info.

Readme

Keywords

Package Sidebar

Install

npm i sb-stream-promise

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • steelbrain