$ npm install buffer-to-vinyl
Create a vinyl file or stream from a buffer
$ npm install --save buffer-to-vinyl
var bufferToVinyl = require('buffer-to-vinyl');
var fs = require('fs');
bufferToVinyl.file(fs.readFileSync('foo.jpg', null));
bufferToVinyl.stream(fs.readFileSync('foo.jpg', null));
Creates a vinyl file.
Creates a object stream.
MIT © Kevin Mårtensson
© 2010 - cnpmjs.org x YWFE | Home | YWFE