Socket
Socket
Sign inDemoInstall

vinyl-string

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vinyl-string

Pretend a string is coming from a file on disk


Version published
Weekly downloads
9.8K
decreased by-3.32%
Maintainers
1
Install size
59.1 kB
Created
Weekly downloads
 

Readme

Source

#vinyl-string Build Status

For the terminally lazy

###constructor(fileContents, options)

fileContents

The contents of the pretend file

Type: String or Buffer

options

An options object for the creation of a vinyl file.

options.keepOpen

Set to true to keep the stream open. Use when piping /into/ the vinyl-string object.

###example

var vs = require('vinyl-string');
var vFile = vs(
  "my file contents!",
  {
    path: "filename.txt"
  }
);

vFile.pipe(gulp.dest("./output"));
/* if vFile is also a stream destination, set keepOpen: true */
var vs = require('vinyl-string');
var vFile = vs(
  "my file contents!",
  {
    path: "filename.txt",
    keepOpen: true // allow piping in to vFile
  }
);

gulp.src(["./src/*.txt"])
  .pipe(vFile)
  .pipe(gulp.dest("./output");

Keywords

FAQs

Last updated on 25 Apr 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc