datauri-stream
Lightweight data
─► data URI
transform stream.
examples
Use with the file system:
var DataUri = var fs = fs // 'data:image/jpg;base64,iVBORw0KGg...'
Use with http requests:
var DataUri = var http = http
Use on the browser with browserify:
var DataUri = var hyperquest = var concat =
api
var DataUriStream =
var ts = DataUriStream([opts])
opts.mime
An optional override for the mime type.
The mime type will be automatically detected otherwise, using the file-type module. It supports many file types.
If the source is not a file, then you'll want to supply the mime type.
ts
A standard Transform Stream. Pipe to and from it.
install
With npm do:
npm install datauri-stream
see also
pipe-transform-cli
- Command line utility to pipe one input encoding to another encoding