Socket
Socket
Sign inDemoInstall

stream-assert

Package Overview
Dependencies
7
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

14

lib/assert.js

@@ -17,3 +17,4 @@ var through = require('through2');

i++;
cb(null, obj);
this.emit('data', obj);
cb(null);
}).on('finish', function () {

@@ -42,3 +43,4 @@ this.emit('end');

i++;
cb(null, obj);
this.emit('data', obj);
cb(null);
}).on('finish', function () {

@@ -56,3 +58,4 @@ this.emit('end');

} catch (err) { }
cb(null, obj);
this.emit('data', obj);
cb(null);
}).on('finish', function () {

@@ -70,3 +73,4 @@ if (!matched) {

i++;
cb(null, obj);
this.emit('data', obj);
cb(null);
}).on('finish', function () {

@@ -76,3 +80,3 @@ var assertion = expected;

assertion = function (data) {
if (data !== expected) throw new Error('not ' + data + ' equal ' + expected);
if (data !== expected) throw new Error(data + ' not equal ' + expected);
}

@@ -79,0 +83,0 @@ }

{
"name": "stream-assert",
"version": "1.0.0",
"version": "1.0.1",
"description": "Assertion library for streams",

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

# stream-assert [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
This library under heavy development. API will significally change, be brave to pull-request your suggestions about it.
### Assertion library wanted

@@ -17,5 +15,5 @@

array([1, 2, 3])
.pipe(assert.first(function(data) { should.eql(1); }))
.pipe(assert.second(function(data) { should.eql(2); }))
.pipe(assert.nth(2, function(data) { should.eql(3); }))
.pipe(assert.first(function(data) { data.should.eql(1); }))
.pipe(assert.second(function(data) { data.should.eql(2); }))
.pipe(assert.nth(2, function(data) { data.should.eql(3); }))
.pipe(assert.length(1))

@@ -22,0 +20,0 @@ .on('end', console.log);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc