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

engine.io-parser

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-parser - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

5

History.md
2.0.2 / 2017-03-21
==================
* [fix] Enable to utf8-decode string payloads (#88)
2.0.1 / 2017-03-06

@@ -3,0 +8,0 @@ ==================

14

lib/browser.js

@@ -372,3 +372,3 @@ /**

exports.decodePayload = function (data, binaryType, callback) {
exports.decodePayload = function (data, binaryType, utf8decode, callback) {
if (typeof data !== 'string') {

@@ -383,2 +383,7 @@ return exports.decodePayloadAsBinary(data, binaryType, callback);

if (typeof utf8decode === 'function') {
callback = utf8decode;
utf8decode = null;
}
var packet;

@@ -390,2 +395,9 @@ if (data === '') {

if (utf8decode) {
data = tryDecode(data);
if (data === false) {
return callback(err, 0, 1);
}
}
var length = '', n, msg;

@@ -392,0 +404,0 @@

@@ -268,3 +268,3 @@ /**

exports.decodePayload = function (data, binaryType, callback) {
exports.decodePayload = function (data, binaryType, utf8decode, callback) {
if (typeof data !== 'string') {

@@ -279,2 +279,7 @@ return exports.decodePayloadAsBinary(data, binaryType, callback);

if (typeof utf8decode === 'function') {
callback = utf8decode;
utf8decode = null;
}
if (data === '') {

@@ -285,2 +290,9 @@ // parser error - ignoring payload

if (utf8decode) {
data = tryDecode(data);
if (data === false) {
return callback(err, 0, 1);
}
}
var length = '', n, msg, packet;

@@ -287,0 +299,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/socketio/engine.io-parser",

@@ -8,0 +8,0 @@ "devDependencies": {

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