socket.io-parser
Advanced tools
Comparing version 3.4.0 to 3.4.1
17
index.js
@@ -289,7 +289,5 @@ | ||
if (exports.BINARY_EVENT === p.type || exports.BINARY_ACK === p.type) { | ||
var buf = ''; | ||
while (str.charAt(++i) !== '-') { | ||
buf += str.charAt(i); | ||
if (i == str.length) break; | ||
} | ||
var start = i + 1; | ||
while (str.charAt(++i) !== '-' && i != str.length) {} | ||
var buf = str.substring(start, i); | ||
if (buf != Number(buf) || str.charAt(i) !== '-') { | ||
@@ -303,9 +301,9 @@ throw new Error('Illegal attachments'); | ||
if ('/' === str.charAt(i + 1)) { | ||
p.nsp = ''; | ||
var start = i + 1; | ||
while (++i) { | ||
var c = str.charAt(i); | ||
if (',' === c) break; | ||
p.nsp += c; | ||
if (i === str.length) break; | ||
} | ||
p.nsp = str.substring(start, i); | ||
} else { | ||
@@ -318,3 +316,3 @@ p.nsp = '/'; | ||
if ('' !== next && Number(next) == next) { | ||
p.id = ''; | ||
var start = i + 1; | ||
while (++i) { | ||
@@ -326,6 +324,5 @@ var c = str.charAt(i); | ||
} | ||
p.id += str.charAt(i); | ||
if (i === str.length) break; | ||
} | ||
p.id = Number(p.id); | ||
p.id = Number(str.substring(start, i + 1)); | ||
} | ||
@@ -332,0 +329,0 @@ |
{ | ||
"name": "socket.io-parser", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "socket.io protocol parser", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Automattic/socket.io-parser.git" | ||
"url": "https://github.com/socketio/socket.io-parser.git" | ||
}, | ||
@@ -20,2 +20,5 @@ "files": [ | ||
"devDependencies": { | ||
"@babel/core": "~7.9.6", | ||
"@babel/preset-env": "~7.9.6", | ||
"babelify": "~10.0.0", | ||
"benchmark": "2.1.2", | ||
@@ -22,0 +25,0 @@ "expect.js": "0.3.1", |
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
16969
7
9
481