buffer-to-vinyl
Create a vinyl file or stream from a buffer
Last updated 10 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buffer-to-vinyl 
SYNC missed versions from official npm registry.

buffer-to-vinyl Build Status

Create a vinyl file or stream from a buffer

Install

$ npm install --save buffer-to-vinyl

Usage

var bufferToVinyl = require('buffer-to-vinyl');
var fs = require('fs');

bufferToVinyl.file(fs.readFileSync('foo.jpg', null));
bufferToVinyl.stream(fs.readFileSync('foo.jpg', null));

API

.file(buf, [name])

Creates a vinyl file.

.stream(buf, [name])

Creates a object stream.

License

MIT © Kevin Mårtensson

Current Tags

  • 1.1.0                                ...           latest (10 years ago)

3 Versions

  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (3)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |