text-decoder
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -12,8 +12,7 @@ const PassThroughDecoder = require('./lib/pass-through-decoder') | ||
break | ||
default: | ||
this.decoder = new PassThroughDecoder(this.encoding) | ||
break | ||
case 'utf16le': | ||
case 'base64': | ||
throw new Error('Unsupported encoding: ' + this.encoding) | ||
default: | ||
this.decoder = new PassThroughDecoder(this.encoding) | ||
} | ||
@@ -20,0 +19,0 @@ } |
@@ -73,4 +73,12 @@ /** | ||
flush () { | ||
return this.bytesNeeded > 0 ? '\ufffd' : '' | ||
const result = this.bytesNeeded > 0 ? '\ufffd' : '' | ||
this.codePoint = 0 | ||
this.bytesNeeded = 0 | ||
this.bytesSeen = 0 | ||
this.lowerBoundary = 0x80 | ||
this.upperBoundary = 0xbf | ||
return result | ||
} | ||
} |
{ | ||
"name": "text-decoder", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Streaming text decoder that preserves multibyte Unicode characters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
16184
127
2