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

node-stream

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-stream - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/forEachJson.js

11

index.js
/* jshint node:true */
var forEach = require('./lib/forEach.js');
var forEachObj = require('./lib/forEachObj.js');
var forEachJson = require('./lib/forEachJson.js');
var wait = require('./lib/wait.js');
var waitObj = require('./lib/waitObj.js');
var waitJson = require('./lib/waitJson.js');
forEach.obj = forEachObj;
forEach.json = forEachJson;
wait.obj = waitObj;
wait.json = waitJson;
module.exports = {

@@ -7,0 +18,0 @@ forEach: forEach,

1

lib/forEach.js

@@ -13,2 +13,1 @@ /* jshint node:true */

module.exports = forEach;
module.exports.obj = forEachObj;

@@ -20,2 +20,1 @@ /* jshint node:true */

module.exports = wait;
module.exports.obj = waitObj;
{
"name": "node-stream",
"version": "0.0.1",
"version": "0.0.2",
"description": "Utilities for working with node streams.",

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

@@ -27,7 +27,9 @@ /* jshint node:true */

module.exports = {
beforeEach: function(done) {
this.stream = getReadableStream();
done();
},
test: function(done) {
var self = this;
forEach(getReadableStream(), _.noop, done);
forEach(this.stream, _.noop, done);
}
};

@@ -27,7 +27,9 @@ /* jshint node:true */

module.exports = {
beforeEach: function(done) {
this.stream = getReadableStream();
done();
},
test: function(done) {
var self = this;
forEachObj(getReadableStream(), _.noop, done);
forEachObj(this.stream, _.noop, done);
}
};

@@ -26,7 +26,9 @@ /* jshint node:true */

module.exports = {
beforeEach: function(done) {
this.stream = getReadableStream();
done();
},
test: function(done) {
var self = this;
wait(getReadableStream(), done);
wait(this.stream, done);
}
};

@@ -26,7 +26,9 @@ /* jshint node:true */

module.exports = {
beforeEach: function(done) {
this.stream = getReadableStream();
done();
},
test: function(done) {
var self = this;
waitObj(getReadableStream(), done);
waitObj(this.stream, done);
}
};

@@ -15,3 +15,3 @@ /* jshint node:true, mocha: true */

.and.to.have.length(2)
.and.to.have.all.keys('obj');
.and.to.have.all.keys('obj', 'json');

@@ -22,5 +22,9 @@ expect(index.wait.obj).to.be.a('function')

expect(index.wait.json).to.be.a('function')
.and.to.have.length(2);
expect(_.keys(index.wait.json)).to.have.length(0);
expect(index.forEach).to.be.a('function')
.and.to.have.length(3)
.and.to.have.all.keys('obj');
.and.to.have.all.keys('obj', 'json');

@@ -30,3 +34,7 @@ expect(index.forEach.obj).to.be.a('function')

expect(_.keys(index.forEach.obj)).to.have.length(0);
expect(index.forEach.json).to.be.a('function')
.and.to.have.length(3);
expect(_.keys(index.forEach.json)).to.have.length(0);
});
});
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