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

coleccionista

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coleccionista - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

24

index.js
"use strict";
var inherits = require('util').inherits;
var fs = require('fs');
var EventEmitter = require("events").EventEmitter;
var PassThrough = require('stream').PassThrough;
var inherits = require("util").inherits;
var fs = require("fs");
var PassThrough = require("stream").PassThrough;
var Coleccionista = function(filesOrStreams, options) {
if(!filesOrStreams.length) {
throw new Error('Files argument required');
throw new Error("Files argument required");
}

@@ -23,12 +22,15 @@

var self = this,
end = (this.fileIndex === this.files.length-1),
end = (this.fileIndex === this.files.length - 1),
f = this.files[this.fileIndex++],
file = typeof f === 'string' ? fs.createReadStream(f, this.o) : f;
file = typeof f === "string" ? fs.createReadStream(f, this.o) : f;
file
.on('open', function() {
self.emit('itemstart');
.on("error", function(err) {
self.emit("error", err);
})
.on('end', function(){
self.emit('itemend');
.on("open", function() {
self.emit("itemstart");
})
.on("end", function(){
self.emit("itemend");
if(!end) {

@@ -35,0 +37,0 @@ self.next();

{
"name": "coleccionista",
"version": "0.0.2",
"version": "0.0.3",
"description": "Helper class that streams files one by one.",

@@ -5,0 +5,0 @@ "keywords": ["stream", "files", "collect"],

@@ -21,1 +21,2 @@ # Coleccionista #

* __itemend__ — triggers when file stream end
* __error__ — triggers on file errors
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