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

through2-map

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

through2-map - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

14

package.json
{
"name": "through2-map",
"version": "1.2.0",
"version": "1.2.1",
"description": "A through2 to create an Array.prototype.map analog for streams.",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"test": "tap test/"
"test": "node test/"
},

@@ -29,10 +29,10 @@ "repository": {

"devDependencies": {
"tape": "~1.0.4",
"tap": "~0.4.3",
"stream-spigot": "~2.0.0",
"concat-stream": "~1.0.0"
"tape": "~2.3.0",
"stream-spigot": "~3.0.1",
"concat-stream": "~1.2.1"
},
"dependencies": {
"through2": "~0.2.2"
"through2": "~0.2.3",
"terminus": "~1.0.4"
}
}

@@ -5,3 +5,3 @@ var test = require("tape").test

var spigot = require("stream-spigot")
var concat = require("concat-stream")
var concat = require("terminus").concat

@@ -21,3 +21,3 @@ test("ctor", function (t) {

spigot([
spigot({objectMode: true}, [
{foo: "bar"},

@@ -28,5 +28,5 @@ {foo: "baz"},

{foo: "buzz"},
], {objectMode: true})
])
.pipe(new Map({objectMode: true}))
.pipe(concat(combine))
.pipe(concat({objectMode: true}, combine))
})

@@ -48,3 +48,3 @@

spigot([
spigot({objectMode: true}, [
{foo: "bar"},

@@ -55,5 +55,5 @@ {foo: "baz"},

{foo: "buzz"},
], {objectMode: true})
])
.pipe(new Map({objectMode: true}))
.pipe(concat(combine))
.pipe(concat({objectMode: true}, combine))
})

@@ -96,3 +96,3 @@

spigot([
spigot({objectMode: true}, [
{foo: "bar"},

@@ -103,5 +103,5 @@ {foo: "baz"},

{foo: "buzz"},
], {objectMode: true})
])
.pipe(m)
.pipe(concat(combine))
.pipe(concat({objectMode: true}, combine))
})

@@ -134,8 +134,11 @@

var f = map({objectMode: true}, function (chunk) {
return null
var count = 0
var f = map(function (chunk) {
if (++count > 1)
return null
return chunk
})
function combine(result) {
t.notOk(result, "Ended on the first chunk")
t.equals(result.toString(), "a", "result is correct")
}

@@ -151,3 +154,3 @@

]).pipe(f)
.pipe(concat(combine))
})
.pipe(concat({objectMode: true}, combine))
})
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