Comparing version 0.1.5 to 0.1.6
@@ -290,3 +290,3 @@ 'use strict'; | ||
// | ||
// Check if we need to end and clean up the assigment once we've completed all | ||
// Check if we need to end and clean up the assignment once we've completed all | ||
// currently running tasks. | ||
@@ -356,5 +356,5 @@ // | ||
* | ||
* @param {Array} data | ||
* @param {Function} iterator | ||
* @param {Function} completion | ||
* @param {Array} data The data to iterate over. | ||
* @param {Function} iterator Called for each added data point. | ||
* @param {Function} done Completion callback. | ||
* @api private | ||
@@ -367,2 +367,3 @@ */ | ||
done = done || noop; | ||
if (undefined === data) return done(undefined, mapper); | ||
@@ -369,0 +370,0 @@ // |
{ | ||
"name": "assign", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Map/Reduce promise like returned API -- Really not way to properly describe this module..", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -44,2 +44,15 @@ describe('Assign', function () { | ||
describe('#end', function () { | ||
it('does not write undefined when called without data', function (next) { | ||
var assign = new Assignment(function (err, data) { | ||
if (err) return next(err); | ||
expect(data).to.have.length(0); | ||
next(); | ||
}); | ||
assign.end(); | ||
}); | ||
}); | ||
describe('#filter', function () { | ||
@@ -46,0 +59,0 @@ it('receives the written data', function (done) { |
16191
506