Git Product home page Git Product logo

stream-to-blob's Introduction

stream-to-blob travis npm downloads javascript style guide

Convert a Readable Stream to a Blob

Sauce Test Status

This package converts a Readable Stream into a Blob.

This package is used by WebTorrent.

install

npm install stream-to-blob

usage

const streamToBlob = require('stream-to-blob')

const stream = new stream.Readable() // any Node.js readable stream
const blob = await streamToBlob(stream)

api

promise = streamToBlob(stream, [mimeType])

Convert the given readable stream, stream, into a W3C Blob. If mimeType is provided, then the Blob will have its mime type set to that value.

Returns a Promise which resolves to a Blob object on success. Otherwise, rejects with an Error.

license

MIT. Copyright (c) Feross Aboukhadijeh.

stream-to-blob's People

Contributors

feross avatar greenkeeper[bot] avatar shanmukhateja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stream-to-blob's Issues

An in-range update of standard is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 11.0.1 of standard was just published.

Branch Build failing 🚨
Dependency standard
Current Version 11.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 20 commits.

  • 670a3be authors
  • b7e6cbc 11.0.1
  • 34a3c40 Merge pull request #1092 from watson/elastic-logo
  • 5382643 Replace Opbeat with Elastic logo
  • c40c799 Merge pull request #1091 from mackermans/master
  • 504fcff docs(README): update typeform logo
  • a5b779f Swap README.md and RULES.md symlinks (#1090)
  • e818224 Merge pull request #1072 from standard/greenkeeper/eslint-plugin-react-7.7.0
  • 9dc888f Merge branch 'master' into greenkeeper/eslint-plugin-react-7.7.0
  • a5293dd Merge pull request #1075 from standard/greenkeeper/eslint-plugin-import-2.9.0
  • ebf6620 Merge pull request #1087 from standard/greenkeeper/eslint-plugin-promise-3.7.0
  • 116a871 fix(package): update eslint-plugin-promise to version 3.7.0
  • 738edc4 readme: add standard talk
  • c93ac0d Merge pull request #1076 from tumobi/fix-links
  • 4f8c1f5 Fix webstorm.md links

There are 20 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Donate button

After 3 days of torturing myself getting a createDecipheriv.update to play nice with URL.createObjectURL, I've lost all hope and was preparing myself to get an earful from the manager when I stumbled across your package.

Its a god-send. Thank you so much for maintaining this package.

I'd like to buy you a beer for this. Could you add like a Paypal link I could use?

An in-range update of tape is breaking the build 🚨

Version 4.9.1 of tape was just published.

Branch Build failing 🚨
Dependency tape
Current Version 4.9.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 10 commits.

  • 050b318 v4.9.1
  • 73232c0 [Dev Deps] update js-yaml
  • 8a2d29b [Deps] update has, for-each, resolve, object-inspect
  • c6f5313 [Tests] add eclint and eslint, to enforce a consistent style
  • 45788a5 [Dev Deps] update concat-stream
  • ec4a71d [fix] Fix bug in functionName regex during stack parsing
  • 7261ccc Merge pull request #433 from mcnuttandrew/add-trb
  • 6cbc53e Add tap-react-browser
  • 9d501ff [Dev Deps] use ~ for dev deps; update to latest nonbreaking
  • 24e0a8d Fix spelling of "parameterize"

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of standard is breaking the build 🚨

Version 12.0.1 of standard was just published.

Branch Build failing 🚨
Dependency standard
Current Version 12.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 8 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Blob is not defined

Using this with latest Node.js gives me:

/node_modules/stream-to-blob/index.js:16
        : new Blob(chunks)
              ^
ReferenceError: Blob is not defined
    at ReadStream.<anonymous> (/home/me/cruncher/node_modules/stream-to-blob/index.js:16:15)
    at emitNone (events.js:91:20)
    at ReadStream.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
error Command failed with exit code 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.