🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ws

Package Overview
Dependencies
Maintainers
4
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ws - npm Package Compare versions

Comparing version

to
7.4.6

14

lib/validation.js

@@ -35,3 +35,3 @@ 'use strict';

while (i < len) {
if (buf[i] < 0x80) {
if ((buf[i] & 0x80) === 0) {
// 0xxxxxxx

@@ -47,5 +47,5 @@ i++;

return false;
} else {
i += 2;
}
i += 2;
} else if ((buf[i] & 0xf0) === 0xe0) {

@@ -61,5 +61,5 @@ // 1110xxxx 10xxxxxx 10xxxxxx

return false;
} else {
i += 3;
}
i += 3;
} else if ((buf[i] & 0xf8) === 0xf0) {

@@ -77,5 +77,5 @@ // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

return false;
} else {
i += 4;
}
i += 4;
} else {

@@ -82,0 +82,0 @@ return false;

@@ -289,3 +289,3 @@ 'use strict';

if (protocol) {
protocol = protocol.trim().split(/ *, */);
protocol = protocol.split(',').map(trim);

@@ -408,1 +408,13 @@ //

}
/**
* Remove whitespace characters from both ends of a string.
*
* @param {String} str The string
* @return {String} A new string representing `str` stripped of whitespace
* characters from both its beginning and end
* @private
*/
function trim(str) {
return str.trim();
}

@@ -657,5 +657,4 @@ 'use strict';

perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
websocket._extensions[
PerMessageDeflate.extensionName
] = perMessageDeflate;
websocket._extensions[PerMessageDeflate.extensionName] =
perMessageDeflate;
}

@@ -662,0 +661,0 @@ } catch (err) {

{
"name": "ws",
"version": "7.4.5",
"version": "7.4.6",
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",

@@ -5,0 +5,0 @@ "keywords": [