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

glob-stream

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-stream - npm Package Compare versions

Comparing version 3.1.3 to 3.1.5

9

index.js

@@ -0,5 +1,7 @@

/*jslint node: true */
'use strict';
var through = require('through');
var map = require('map-stream')
var map = require('map-stream');
var Combine = require('combine-stream');

@@ -61,2 +63,3 @@ var unique = require('unique-stream');

var stream = through();
globber.on('error', stream.emit.bind(stream, 'error'));

@@ -106,5 +109,5 @@ globber.on('end', function(){

// then just pipe them to a single stream and return it
// then just pipe them to a single unique stream and return it
var aggregate = new Combine(streams);
var uniqueStream = unique('path');
var aggregate = new Combine(streams);

@@ -111,0 +114,0 @@ // TODO: set up streaming queue so items come in order

{
"name": "glob-stream",
"description": "File system globs as a stream",
"version": "3.1.3",
"version": "3.1.5",
"homepage": "http://github.com/wearefractal/glob-stream",

@@ -6,0 +6,0 @@ "repository": "git://github.com/wearefractal/glob-stream.git",

var gs = require('../');
var through = require('through');
var should = require('should');

@@ -6,3 +7,2 @@ require('mocha');

var join = path.join;
var sep = path.sep;

@@ -48,2 +48,28 @@

it('should return a file name stream from a glob and respect state', function(done) {
var stream = gs.create("./fixtures/stuff/*.dmc", {cwd: __dirname});
var wrapper = stream.pipe(through(function(data){
this.pause();
setTimeout(function(){
this.queue(data);
this.resume();
}.bind(this), 500);
}));
var count = 0;
should.exist(stream);
stream.on('error', function(err) {
throw err;
});
wrapper.on('data', function(file) {
count++;
});
wrapper.on('end', function(){
count.should.equal(2);
done();
});
});
it('should return a correctly ordered file name stream for two globs and specified base', function(done) {

@@ -50,0 +76,0 @@ var baseDir = join(__dirname, "./fixtures");

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