Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-data-uri-stream with all npm packages installed. Try it out:

var gulpDataUriStream = require("gulp-data-uri-stream")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-data-uri-stream v0.0.3

gulp streaming module to convert generic input to a data uri

gulp-data-uri-stream

gulp streaming module to convert generic input to a data uri

Usage

var uri = require('gulp-data-uri-stream');
var concat = require('gulp-concat');

gulp.task('data-urify', function() {

    return gulp.src('images/*.svg')
        .pipe(uri())
        .pipe(concat("URIs.txt"))
        .pipe(gulp.dest("./"));

});

Options

options are passed as an object in the module call, i.e.

.pipe( uri( { myOptionKey: "myOptionValue" } ) )

output

Data that is streamed to the next module in the pipeline

* vinyl [default] - vinyl virtual file format
* json - object keys are relative file path

encoding

The data URI encoding format

* base64 [default]
* utf8

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free