Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vinyl-buffer

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl-buffer

Convert streaming vinyl files to use buffers

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127K
decreased by-17.71%
Maintainers
2
Weekly downloads
 
Created

What is vinyl-buffer?

The vinyl-buffer npm package is used to convert streaming vinyl file objects into buffered vinyl file objects. This is particularly useful in build systems like Gulp where you may need to perform operations that require the entire file to be in memory.

What are vinyl-buffer's main functionalities?

Convert Stream to Buffer

This feature allows you to convert a stream into a buffer so that you can perform operations that require the entire file to be in memory. In this example, the vinyl-buffer package is used to convert the stream from browserify into a buffer so that it can be minified using gulp-uglify.

const gulp = require('gulp');
const vinylBuffer = require('vinyl-buffer');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const browserify = require('browserify');

gulp.task('scripts', function() {
  return browserify('src/app.js')
    .bundle()
    .pipe(source('bundle.js'))
    .pipe(vinylBuffer())
    .pipe(uglify())
    .pipe(gulp.dest('dist'));
});

Other packages similar to vinyl-buffer

Keywords

FAQs

Package last updated on 23 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc