# vinyl-buffer

> Convert streaming vinyl files to use buffers

Latest version **1.0.1** (published 2017-12-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install vinyl-buffer
pnpm add vinyl-buffer
yarn add vinyl-buffer
bun add vinyl-buffer
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-23 |
| First published | 2014-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/vinyl-buffer) |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 76 |
| Author | Hugh Kennedy |
| Maintainers | phated, hughsk |
| Keywords | vinyl, gulpfriendly, convert, buffer, stream |

## Links

- npm: https://www.npmjs.com/package/vinyl-buffer
- Repository: https://github.com/hughsk/vinyl-buffer
- Issues: https://github.com/hughsk/vinyl-buffer/issues
- npm.io page: https://npm.io/package/vinyl-buffer

## Dependencies (2)

- [bl](https://npm.io/package/bl.md) ^1.2.1
- [through2](https://npm.io/package/through2.md) ^2.0.3

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-12-23
- 1.0.0 — 2014-09-07
- 0.0.0 — 2014-02-23

## README

# vinyl-buffer [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/vinyl-buffer&title=vinyl-buffer&description=hughsk/vinyl-buffer%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #

Convert streaming [vinyl](http://github.com/wearefractal/vinyl) files to use
buffers.

An alternative to [gulp-streamify](http://github.com/nfroidure/gulp-streamify)
that you can pipe to, instead of being required to wrap your streams.

``` javascript
var browserify = require('browserify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var uglify = require('gulp-uglify')
var size = require('gulp-size')
var gulp = require('gulp')

gulp.task('build', function() {
  var bundler = browserify('./index.js')

  return bundler.bundle()
    .pipe(source('index.js'))
    .pipe(buffer())
    .pipe(uglify())
    .pipe(size())
    .pipe(gulp.dest('dist/'))
})
```

## Usage ##

[![vinyl-buffer](https://nodei.co/npm/vinyl-buffer.png?mini=true)](https://nodei.co/npm/vinyl-buffer)

### `vinylBuffer()` ###

Creates a transform stream that takes vinyl files as input, and outputs
modified vinyl files as output. If `file.isStream()`, `file.contents` will
be converted to a `Buffer` before being emitted again – otherwise, the file
will be emitted immediately.

## License ##

MIT. See [LICENSE.md](http://github.com/hughsk/vinyl-buffer/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/vinyl-buffer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
