pull-stream
Advanced tools
Comparing version 2.12.0 to 2.13.0
@@ -50,2 +50,7 @@ # Throughs | ||
## filterNot (test) | ||
like filter, but remove items where the filter returns true. | ||
## unique (prop) | ||
@@ -52,0 +57,0 @@ |
{ | ||
"name": "pull-stream", | ||
"description": "minimal pull stream", | ||
"version": "2.12.0", | ||
"version": "2.13.0", | ||
"homepage": "https://github.com/dominictarr/pull-stream", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -40,1 +40,19 @@ | ||
}) | ||
test('inverse filter with regexp', function (t) { | ||
pull.infinite() | ||
.pipe(pull.map(function (d) { | ||
return Math.round(d * 1000).toString(16) | ||
})) | ||
.pipe(pull.filterNot(/^[^e]+$/i)) //no E | ||
.pipe(pull.take(37)) | ||
.pipe(pull.writeArray(function (err, array) { | ||
t.equal(array.length, 37) | ||
console.log(array) | ||
array.forEach(function (d) { | ||
t.notEqual(d.indexOf('e'), -1) | ||
}) | ||
t.end() | ||
})) | ||
}) | ||
@@ -42,2 +42,10 @@ var u = require('./util') | ||
var filterNot = exports.filterNot = | ||
function (read, test) { | ||
test = tester(test) | ||
return filter(read, function (e) { | ||
return !test(e) | ||
}) | ||
} | ||
var through = exports.through = | ||
@@ -44,0 +52,0 @@ function (read, op, onEnd) { |
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
33603
888