Files
NapCatQQ/.pnpm-store/v3/files/62/aefb3574e2522c51d0cfdf1c19dc184ebb209bb961c3ed657885a1227ee3d644809e248ee559c74852180b9cbd4474158440b3bb55729496080d247f594d79
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

38 lines
634 B
Plaintext

# buffer-to-vinyl [![Build Status](http://img.shields.io/travis/kevva/buffer-to-vinyl.svg?style=flat)](https://travis-ci.org/kevva/buffer-to-vinyl)
> Create a vinyl file or stream from a buffer
## Install
```
$ npm install --save buffer-to-vinyl
```
## Usage
```js
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](https://github.com/kevva)