Transform stream to create a data uri
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json
test.js

README.md

data-uri-stream

Create a transform stream that will emit a data uri.

Usage

var datauri = require("data-uri-stream"),
	concat = require("concat-stream"),
	fs = require("fs");

	fs.readFile("image.png")
		.pipe(datauri({ type: "image/png" }))
		.pipe(concat(function(data) {
			console.log(data) // datauri
		});