Package Exports
- convert-vinyl-to-vfile
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (convert-vinyl-to-vfile) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
convert-vinyl-to-vfile
Install
npm install --save convert-vinyl-to-vfileUsage
const convertVinylToVfile = require('convert-vinyl-to-vfile')
const {join} = require('path');
const VFile = require('vfile');
const Vinyl = require('vinyl');
const vinylFile = new Vinyl({
contents: Buffer.from('abe lincoln'),
path: join('users', 'dustin', 'project', 'awesome.project.md')
});
const vfile = convertVinylToVfile(vinylFile);
/* =>
* new VFile({
* contents: <Buffer 61 62 65 20 6c 69 6e 63 6f 6c 6e>,
* path: 'users/dustin/project/awesome.project.md'
* })
*/
vfile instanceof VFile;
// => trueLICENSE
MIT © Dustin Specker