Socket
Socket
Sign inDemoInstall

stream-transform

Package Overview
Dependencies
0
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

29

lib/index.js

@@ -47,5 +47,5 @@ // Generated by CoffeeScript 1.9.2

process.nextTick(function() {
var l, len1, row;
for (l = 0, len1 = data.length; l < len1; l++) {
row = data[l];
var len1, m, row;
for (m = 0, len1 = data.length; m < len1; m++) {
row = data[m];
if (error) {

@@ -65,3 +65,7 @@ break;

while ((r = transform.read())) {
results.push(result.push(r));
if (callback) {
results.push(result.push(r));
} else {
results.push(void 0);
}
}

@@ -105,3 +109,3 @@ return results;

Transformer.prototype._transform = function(chunk, encoding, cb) {
var err;
var callback, err, l;
this.started++;

@@ -114,4 +118,10 @@ this.running++;

try {
if (this.transform.length === 2) {
this.transform.call(null, chunk, (function(_this) {
l = this.transform.length;
if (this.options.params != null) {
l--;
}
if (l === 1) {
this._done(null, [this.transform.call(null, chunk, this.options.params)], cb);
} else if (l === 2) {
callback = (function(_this) {
return function() {

@@ -122,5 +132,6 @@ var chunks, err;

};
})(this));
})(this);
this.transform.call(null, chunk, callback, this.options.params);
} else {
this._done(null, [this.transform.call(null, chunk)], cb);
throw Error("Invalid handler arguments");
}

@@ -127,0 +138,0 @@ return false;

{
"version": "0.1.1",
"version": "0.1.2",
"name": "stream-transform",

@@ -4,0 +4,0 @@ "description": "Object transformations implementing the Node.js `stream.Transform` API",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc