Gathering detailed insights and metrics for socket.io-parser
Gathering detailed insights and metrics for socket.io-parser
Gathering detailed insights and metrics for socket.io-parser
Gathering detailed insights and metrics for socket.io-parser
npm install socket.io-parser
Typescript
Module System
Node Version
NPM Version
99
Supply Chain
90.9
Quality
78.9
Maintenance
100
Vulnerability
100
License
Total Downloads
2,384,871,082
Last Day
1,726,528
Last Week
9,522,401
Last Month
40,503,301
Last Year
427,327,480
140 Stars
207 Commits
107 Forks
81 Watchers
7 Branches
20 Contributors
Updated on Apr 27, 2025
Minified
Minified + Gzipped
Latest Version
3.3.4
Package Id
socket.io-parser@3.3.4
Unpacked Size
16.95 kB
Size
5.47 kB
File Count
6
NPM Version
9.6.7
Node Version
20.3.0
Published on
Jul 22, 2024
Cumulative downloads
Total Downloads
Last Day
48.6%
1,726,528
Compared to previous day
Last Week
4%
9,522,401
Compared to previous week
Last Month
-0.5%
40,503,301
Compared to previous month
Last Year
16%
427,327,480
Compared to previous year
3
6
A socket.io encoder and decoder written in JavaScript complying with version 3
of socket.io-protocol.
Used by socket.io and
socket.io-client.
socket.io-parser is the reference implementation of socket.io-protocol. Read the full API here: socket.io-protocol.
1var parser = require('socket.io-parser'); 2var encoder = new parser.Encoder(); 3var packet = { 4 type: parser.EVENT, 5 data: 'test-packet', 6 id: 13 7}; 8encoder.encode(packet, function(encodedPackets) { 9 var decoder = new parser.Decoder(); 10 decoder.on('decoded', function(decodedPacket) { 11 // decodedPacket.type == parser.EVENT 12 // decodedPacket.data == 'test-packet' 13 // decodedPacket.id == 13 14 }); 15 16 for (var i = 0; i < encodedPackets.length; i++) { 17 decoder.add(encodedPackets[i]); 18 } 19});
1var parser = require('socket.io-parser'); 2var encoder = new parser.Encoder(); 3var packet = { 4 type: parser.BINARY_EVENT, 5 data: {i: new Buffer(1234), j: new Blob([new ArrayBuffer(2)])} 6 id: 15 7}; 8encoder.encode(packet, function(encodedPackets) { 9 var decoder = new parser.Decoder(); 10 decoder.on('decoded', function(decodedPacket) { 11 // decodedPacket.type == parser.BINARY_EVENT 12 // Buffer.isBuffer(decodedPacket.data.i) == true 13 // Buffer.isBuffer(decodedPacket.data.j) == true 14 // decodedPacket.id == 15 15 }); 16 17 for (var i = 0; i < encodedPackets.length; i++) { 18 decoder.add(encodedPackets[i]); 19 } 20});
See the test suite for more examples of how socket.io-parser is used.
MIT
9.8/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
>= 3.4.0, < 3.4.2
Patched Versions
3.4.2
9.8/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
< 3.3.3
Patched Versions
3.3.3
9.8/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
>= 4.0.0, < 4.0.5
Patched Versions
4.0.5
9.8/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
>= 4.1.0, < 4.2.1
Patched Versions
4.2.1
7.5/10
Summary
Resource exhaustion in socket.io-parser
Affected Versions
= 3.4.0
Patched Versions
3.4.1
7.5/10
Summary
Resource exhaustion in socket.io-parser
Affected Versions
< 3.3.2
Patched Versions
3.3.2
7.3/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
< 3.3.4
Patched Versions
3.3.4
7.3/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
>= 4.0.4, < 4.2.3
Patched Versions
4.2.3
7.3/10
Summary
Insufficient validation when decoding a Socket.IO packet
Affected Versions
>= 3.4.0, < 3.4.3
Patched Versions
3.4.3
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 2/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More