Comparing version 0.1.0 to 0.1.1
@@ -95,3 +95,3 @@ 'use strict'; | ||
if (str.length < lineLength) { | ||
if (str.length <= lineLength) { | ||
return str; | ||
@@ -207,3 +207,3 @@ } | ||
if(this.options.lineLength !== false){ | ||
if (this.options.lineLength !== false) { | ||
this.options.lineLength = this.options.lineLength || 76; | ||
@@ -283,3 +283,3 @@ } | ||
Decoder.prototype._transform = function(chunk, encoding, done) { | ||
var qp, _self = this; | ||
var qp, buf, _self = this; | ||
@@ -302,5 +302,5 @@ chunk = chunk.toString('ascii'); | ||
if (qp) { | ||
qp = decode(qp); | ||
this.outputBytes += qp.length; | ||
this.push(qp); | ||
buf = decode(qp); | ||
this.outputBytes += buf.length; | ||
this.push(buf); | ||
} | ||
@@ -312,8 +312,9 @@ | ||
Decoder.prototype._flush = function(done) { | ||
var qp = decode(this._curLine); | ||
if (qp) { | ||
this.outputBytes += qp.length; | ||
this.push(qp); | ||
var qp, buf; | ||
if (this._curLine) { | ||
buf = decode(this._curLine); | ||
this.outputBytes += buf.length; | ||
this.push(buf); | ||
} | ||
done(); | ||
}; |
{ | ||
"name": "libqp", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Encode and decode quoted-printable strings according to rfc2045", | ||
@@ -5,0 +5,0 @@ "main": "lib/libqp.js", |
@@ -100,3 +100,3 @@ # libqp | ||
var fs = require('fs'); | ||
var encoded = fs.createReadStream(encoded.txt'); | ||
var encoded = fs.createReadStream('encoded.txt'); | ||
var dest = fs.createReadStream('dest.txt'); | ||
@@ -103,0 +103,0 @@ var decoder = new libqp.Decoder(); |
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
12887
266