through2-map
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"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)) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7524
3
140
2
+ Addedterminus@~1.0.4
+ Addedreadable-stream@1.0.34(transitive)
+ Addedterminus@1.0.12(transitive)
+ Addedxtend@4.0.2(transitive)
Updatedthrough2@~0.2.3