Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-decoder

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-decoder - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

5

index.js

@@ -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 @@ }

10

lib/utf8-decoder.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc