Socket
Socket
Sign inDemoInstall

through2

Package Overview
Dependencies
11
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "through2",
"version": "0.1.0",
"version": "0.2.0",
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",

@@ -5,0 +5,0 @@ "main": "through2.js",

@@ -48,3 +48,3 @@ # through2

<b><code>through2([ options, ] transformFunction[, flushFunction ])</code></b>
<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>

@@ -74,2 +74,4 @@ Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).

If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.
### flushFunction

@@ -76,0 +78,0 @@

@@ -5,2 +5,7 @@ const Transform = require('stream').Transform || require('readable-stream/transform')

function noop (chunk, enc, callback) {
this.push(chunk)
callback()
}
function ctor (options, transform, flush) {

@@ -13,2 +18,5 @@ if (typeof options == 'function') {

if (typeof transform != 'function')
transform = noop
function Through2 (override) {

@@ -15,0 +23,0 @@ if (!(this instanceof Through2))

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