node-stream
Advanced tools
Comparing version 0.0.1 to 0.0.2
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, |
@@ -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); | ||
}); | ||
}); |
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
34898
24
1005