Socket
Socket
Sign inDemoInstall

through2

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

through2 - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

.nyc_output/1f8aad7c-9bd0-404c-ab51-350cb29c5dc9.json

4

LICENSE.md
# The MIT License (MIT)
**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors**
**Copyright (c) Rod Vagg (the "Original Author") and additional contributors**

@@ -9,2 +9,2 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "through2",
"version": "2.0.3",
"version": "2.0.4",
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
"main": "through2.js",
"scripts": {
"test": "node test/test.js | faucet",
"test-local": "brtapsauce-local test/basic-test.js"
"test": "nyc node test/test.js | faucet && nyc report"
},

@@ -23,11 +22,12 @@ "repository": {

"dependencies": {
"readable-stream": "^2.1.5",
"readable-stream": "2 || 3",
"xtend": "~4.0.1"
},
"devDependencies": {
"bl": "~1.1.2",
"bl": "~2.0.1",
"faucet": "0.0.1",
"stream-spigot": "~3.0.5",
"tape": "~4.6.2"
"nyc": "~13.1.0",
"stream-spigot": "~3.0.6",
"tape": "~4.9.1"
}
}

@@ -5,3 +5,3 @@ # through2

**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise**

@@ -24,5 +24,3 @@ Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.

.pipe(fs.createWriteStream('out.txt'))
.on('finish', function () {
doSomethingSpecial()
})
.on('finish', () => doSomethingSpecial())
```

@@ -47,6 +45,6 @@

}))
.on('data', function (data) {
.on('data', (data) => {
all.push(data)
})
.on('end', function () {
.on('end', () => {
doSomethingSpecial(all)

@@ -73,3 +71,3 @@ })

.pipe(through2({ objectMode: true, allowHalfOpen: false },
function (chunk, enc, cb) {
(chunk, enc, cb) => {
cb(null, 'wut?') // note we can use the second argument on the callback

@@ -99,3 +97,3 @@ // to provide data as an alternative to this.push('wut?')

.pipe(through2(
function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
(chunk, enc, cb) => cb(null, chunk), // transform is a noop
function (cb) { // flush function

@@ -141,2 +139,2 @@ this.push('tacking on an extra buffer to the end');

**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

@@ -1,2 +0,2 @@

var Transform = require('readable-stream/transform')
var Transform = require('readable-stream').Transform
, inherits = require('util').inherits

@@ -3,0 +3,0 @@ , xtend = require('xtend')

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