Comparing version 0.1.8 to 0.1.9
{ | ||
"name": "buildmail", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "buildmail is a low level rfc2822 message composer. Define your own mime tree, no magic included.", | ||
@@ -5,0 +5,0 @@ "author": "Andris Reinman <andris@kreata.ee>", |
@@ -73,10 +73,10 @@ 'use strict'; | ||
/** | ||
* Used for generating unique boundaries (prepended to the shared base) | ||
* An array for possible child nodes | ||
*/ | ||
this._nodeId = ++this.rootNode.nodeCounter; | ||
this.childNodes = []; | ||
/** | ||
* An array for possible child nodes | ||
* Used for generating unique boundaries (prepended to the shared base) | ||
*/ | ||
this._childNodes = []; | ||
this._nodeId = ++this.rootNode.nodeCounter; | ||
@@ -156,3 +156,3 @@ /** | ||
this._childNodes.push(childNode); | ||
this.childNodes.push(childNode); | ||
return childNode; | ||
@@ -172,3 +172,3 @@ }; | ||
this.parentNode._childNodes.forEach(function(childNode, i) { | ||
this.parentNode.childNodes.forEach(function(childNode, i) { | ||
if (childNode === this) { | ||
@@ -183,3 +183,3 @@ | ||
node.parentNode._childNodes[i] = node; | ||
node.parentNode.childNodes[i] = node; | ||
} | ||
@@ -201,5 +201,5 @@ }.bind(this)); | ||
for (var i = this.parentNode._childNodes.length - 1; i >= 0; i--) { | ||
if (this.parentNode._childNodes[i] === this) { | ||
this.parentNode._childNodes.splice(i, 1); | ||
for (var i = this.parentNode.childNodes.length - 1; i >= 0; i--) { | ||
if (this.parentNode.childNodes[i] === this) { | ||
this.parentNode.childNodes.splice(i, 1); | ||
this.parentNode = undefined; | ||
@@ -597,7 +597,7 @@ this.rootNode = this; | ||
var processChildNode = function() { | ||
if (childId >= _self._childNodes.length) { | ||
if (childId >= _self.childNodes.length) { | ||
outputStream.write('\r\n--' + _self.boundary + '--\r\n'); | ||
return callback(); | ||
} | ||
var child = _self._childNodes[childId++]; | ||
var child = _self.childNodes[childId++]; | ||
outputStream.write((childId > 1 ? '\r\n' : '') + '--' + _self.boundary + '\r\n'); | ||
@@ -604,0 +604,0 @@ child.stream(outputStream, options, function() { |
@@ -44,4 +44,4 @@ 'use strict'; | ||
expect(child.rootNode).to.equal(mb); | ||
expect(mb._childNodes.length).to.equal(1); | ||
expect(mb._childNodes[0]).to.equal(child); | ||
expect(mb.childNodes.length).to.equal(1); | ||
expect(mb.childNodes[0]).to.equal(child); | ||
}); | ||
@@ -58,4 +58,4 @@ }); | ||
expect(mb._childNodes.length).to.equal(1); | ||
expect(mb._childNodes[0]).to.equal(replacement); | ||
expect(mb.childNodes.length).to.equal(1); | ||
expect(mb.childNodes[0]).to.equal(replacement); | ||
}); | ||
@@ -70,3 +70,3 @@ }); | ||
child.remove(); | ||
expect(mb._childNodes.length).to.equal(0); | ||
expect(mb.childNodes.length).to.equal(0); | ||
expect(child.parenNode).to.not.exist; | ||
@@ -73,0 +73,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
71194