Socket
Socket
Sign inDemoInstall

vinyl-fs

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl-fs - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

16

lib/src/index.js

@@ -6,2 +6,3 @@ 'use strict';

var duplex = require('duplexer2');
var through = require('through2');

@@ -19,5 +20,12 @@ var gs = require('glob-stream');

function src(glob, opt) {
var pass = through.obj();
if (!isValidGlob(glob)) {
throw new Error('Invalid glob argument: ' + glob);
}
// return dead stream if empty array
if (Array.isArray(glob) && glob.length === 0) {
process.nextTick(pass.end.bind(pass));
return pass;
}

@@ -41,4 +49,5 @@ var options = defaults({}, opt, {

return outputStream
.pipe(through.obj());
outputStream = outputStream.pipe(pass);
return duplex(pass, outputStream);
}

@@ -51,2 +60,5 @@

if (Array.isArray(glob) && glob.length !== 0) {
return glob.every(isValidGlob);
}
if (Array.isArray(glob) && glob.length === 0) {
return true;

@@ -53,0 +65,0 @@ }

3

package.json
{
"name": "vinyl-fs",
"description": "Vinyl adapter for the file system",
"version": "0.3.8",
"version": "0.3.9",
"homepage": "http://github.com/wearefractal/vinyl-fs",

@@ -10,2 +10,3 @@ "repository": "git://github.com/wearefractal/vinyl-fs.git",

"dependencies": {
"duplexer2": "0.0.2",
"glob-stream": "^3.1.5",

@@ -12,0 +13,0 @@ "glob-watcher": "^0.0.6",

@@ -29,3 +29,3 @@ var spies = require('./spy');

try {
stream = gulp.src();
stream = vfs.src();
} catch (err) {

@@ -41,3 +41,3 @@ should.exist(err);

try {
stream = gulp.src(123);
stream = vfs.src(123);
} catch (err) {

@@ -50,11 +50,8 @@ should.exist(err);

it('should explode on invalid glob (empty array)', function(done) {
var stream;
try {
stream = gulp.src([]);
} catch (err) {
should.exist(err);
should.not.exist(stream);
it('should not explode on invalid glob (empty array)', function(done) {
var stream = vfs.src([]);
stream.once('data', done);
stream.once('end', function(){
done();
}
});
});

@@ -61,0 +58,0 @@

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