vinyl-to-object

Store virtual file format as regular object

Usage no npm install needed!

<script type="module">
  import vinylToObject from 'https://cdn.skypack.dev/vinyl-to-object';
</script>

README

vinyl-to-object Build Status

Store virtual file format as regular object

Install

npm install --save vinyl-to-object

Example

var File = require('vinyl');
var copy = require('vinyl-to-object');

var file = new File({
    cwd: 'test',
    base: 'test',
    path: '/test/test.txt',
    contents: new Buffer('unicorn')
});

var duplicatedFile = copy(file);

opts

file

Type: vinyl file

Vinyl file to convert

License

MIT © Daniel Husar