stream-to-blob-url

WebJar for stream-to-blob-url

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

stream-to-blob-url
Last Version

Last Version

2.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

stream-to-blob-url
WebJar for stream-to-blob-url
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/feross/stream-to-blob-url

Download stream-to-blob-url

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/stream-to-blob-url/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>stream-to-blob-url</artifactId>
    <version>2.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/stream-to-blob-url/
implementation 'org.webjars.npm:stream-to-blob-url:2.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/stream-to-blob-url/
implementation ("org.webjars.npm:stream-to-blob-url:2.1.1")
'org.webjars.npm:stream-to-blob-url:jar:2.1.1'
<dependency org="org.webjars.npm" name="stream-to-blob-url" rev="2.1.1">
  <artifact name="stream-to-blob-url" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='stream-to-blob-url', version='2.1.1')
)
libraryDependencies += "org.webjars.npm" % "stream-to-blob-url" % "2.1.1"
[org.webjars.npm/stream-to-blob-url "2.1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : stream-to-blob jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

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.

Versions

Version
2.1.1