Git Product home page Git Product logo

stream-to-blob-url's Introduction

stream-to-blob-url travis npm downloads javascript style guide

Convert a Readable Stream to a Blob URL

Sauce Test Status

This package converts a Readable Stream into a Blob URL.

This package is used by WebTorrent.

install

npm install stream-to-blob-url

usage

const toBlobURL = require('stream-to-blob-url')
const fs = require('fs')

const blobUrl = await toBlobURL(fs.createReadStream('file.txt'))
console.log(url)

api

promise = toBlobURL(stream, [mimeType], callback)

Convert the Readable stream into a W3C Blob URL (blob:...), optionally, with the given mimeType.

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

license

MIT. Copyright (c) Feross Aboukhadijeh.

stream-to-blob-url's People

Contributors

feross avatar greenkeeper[bot] avatar greenkeeperio-bot avatar juliangruber 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

Watchers

 avatar  avatar  avatar  avatar  avatar

stream-to-blob-url's Issues

update package

hi @feross

just wanted to inform you that npm's page of stream-to-blob-url is still showing

toBlobURL(fs.createReadStream('file.txt'), 'file.txt',
instead of
(fs.createReadStream('file.txt'), 'text/plain',

ReferenceError: Blob is not defined

var html = `<!DOCTYPE html>
                            <html>
                                <head>
                                    <meta charset="utf-8">
                                    <title></title>
                                </head>
                                <body>
                                    hey
                                </body>
                            </html>
                        `

            pdf.create(html).toStream(function(err, stream){
              stream.pipe(fs.createWriteStream('classic.pdf')).on('finish',function(){
                  toBlobURL(fs.createReadStream('classic.pdf'), function (err, url) {
                      return res.redirect(url);
                  });
              })
            });

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 🌴

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.