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 1.2.4 to 1.3.0

12

History.md
1.3.0 / 2016-09-26
==================
* [fix] Fix crashes in React Native "navigator is not defined" (#55)
* [refactor] Require base64-arraybuffer module conditionally. (#58)
* [perf] Split try catch into separate function (#65)
* [chore] Use wtf-8 instead of utf8 to prevent lone surrogates from generating parsing error (#68)
* [chore] Restrict files included in npm package (#67)
* [chore] Update license and repository url (#66)
* [chore] Update zuul browser settings following EOL notices (#62)
* [chore] bump zuul (#56)
1.2.4 / 2015-12-04

@@ -3,0 +15,0 @@ ==================

28

lib/browser.js

@@ -8,6 +8,10 @@ /**

var sliceBuffer = require('arraybuffer.slice');
var base64encoder = require('base64-arraybuffer');
var after = require('after');
var utf8 = require('utf8');
var utf8 = require('wtf-8');
var base64encoder;
if (global.ArrayBuffer) {
base64encoder = require('base64-arraybuffer');
}
/**

@@ -20,3 +24,3 @@ * Check if we are running an android browser. That requires us to use

var isAndroid = navigator.userAgent.match(/Android/i);
var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);

@@ -29,3 +33,3 @@ /**

*/
var isPhantomJS = /PhantomJS/i.test(navigator.userAgent);
var isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent);

@@ -231,5 +235,4 @@ /**

if (utf8decode) {
try {
data = utf8.decode(data);
} catch (e) {
data = tryDecode(data);
if (data === false) {
return err;

@@ -260,2 +263,11 @@ }

function tryDecode(data) {
try {
data = utf8.decode(data);
} catch (e) {
return false;
}
return data;
}
/**

@@ -270,3 +282,3 @@ * Decodes a packet encoded in a base64 string

var type = packetslist[msg.charAt(0)];
if (!global.ArrayBuffer) {
if (!base64encoder) {
return { type: type, data: { base64: true, data: msg.substr(1) } };

@@ -273,0 +285,0 @@ }

@@ -5,3 +5,3 @@ /**

var utf8 = require('utf8');
var utf8 = require('wtf-8');
var after = require('after');

@@ -129,6 +129,6 @@ var keys = require('./keys');

var type = data.charAt(0);
if (utf8decode) {
try {
data = utf8.decode(data);
} catch (e) {
data = tryDecode(data);
if (data === false) {
return err;

@@ -162,2 +162,11 @@ }

function tryDecode(data) {
try {
data = utf8.decode(data);
} catch (e) {
return false;
}
return data;
}
/**

@@ -164,0 +173,0 @@ * Decodes a packet encoded in a base64 string.

{
"name": "engine.io-parser",
"description": "Parser for the client for the realtime Engine",
"version": "1.2.4",
"homepage": "https://github.com/Automattic/engine.io-parser",
"license": "MIT",
"version": "1.3.0",
"homepage": "https://github.com/socketio/engine.io-parser",
"devDependencies": {
"expect.js": "0.3.1",
"mocha": "2.2.5",
"zuul": "3.7.3",
"zuul": "3.10.1",
"zuul-ngrok": "3.2.0"

@@ -15,6 +16,6 @@ },

"arraybuffer.slice": "0.0.6",
"base64-arraybuffer": "0.1.2",
"base64-arraybuffer": "0.1.5",
"blob": "0.0.4",
"has-binary": "0.1.6",
"utf8": "2.1.0"
"wtf-8": "1.0.0"
},

@@ -26,5 +27,9 @@ "scripts": {

"type": "git",
"url": "git@github.com:Automattic/engine.io-parser.git"
"url": "git@github.com:socketio/engine.io-parser.git"
},
"files": [
"index.js",
"lib/"
],
"browser": "./lib/browser.js"
}

Sorry, the diff of this file is not supported yet

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