Home / npm packages / socket.io

socket.io source code

Every file of socket.io@4.8.4 as published on npm: 28 files, 513 KB. Search them by exact text or regex, in milliseconds.

It uses: new Function(), process.env, the fs module, http / https, fetch(), XMLHttpRequest, crypto.

What socket.io uses

APIIn socket.io
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
Yes: 4 files
e.g. client-dist/socket.io.esm.min.js
See the lines
child_process
starts other programs
NoWho does
process.env
reads environment variables
Yes: 1 file
e.g. client-dist/socket.io.js
See the lines
the fs module
reads and writes files
Yes: 2 files
e.g. dist/index.js
See the lines
http / https
makes or serves HTTP requests with Node's own modules
Yes: 6 files
e.g. dist/index.js
See the lines
fetch()
makes HTTP requests
Yes: 1 file
e.g. client-dist/socket.io.esm.min.js
See the lines
XMLHttpRequest
makes HTTP requests the old browser way
Yes: 4 files
e.g. client-dist/socket.io.esm.min.js
See the lines
crypto
hashes, encrypts or makes random numbers
Yes: 1 file
e.g. dist/contrib/base64id.js
See the lines
WebAssembly
loads WebAssembly code
NoWho does
document.cookie
reads or writes browser cookies
NoWho does
install scripts
runs a script when it's installed
NoWho does

Exact matches in the published files, so a mention in a comment counts too: open the lines to check.

Largest files

FileSize
client-dist/socket.io.js154 KB
client-dist/socket.io.msgpack.min.js51 KB
client-dist/socket.io.min.js47 KB
client-dist/socket.io.esm.min.js41 KB
dist/socket.js30 KB
dist/index.js29 KB
dist/index.d.ts20 KB
dist/socket.d.ts20 KB
dist/namespace.js19 KB
Readme.md17 KB
dist/namespace.d.ts16 KB
dist/broadcast-operator.js16 KB
dist/broadcast-operator.d.ts11 KB
dist/typed-events.d.ts10.0 KB
dist/client.js8.3 KB
dist/uws.js5.7 KB
dist/parent-namespace.js3.6 KB
dist/contrib/base64id.js2.9 KB
dist/client.d.ts2.9 KB
dist/typed-events.js2.6 KB
package.json2.1 KB
dist/socket-types.d.ts1.6 KB
dist/parent-namespace.d.ts1.4 KB
LICENSE1.1 KB
dist/socket-types.js267 B
dist/uws.d.ts171 B
wrapper.mjs82 B
dist/contrib/base64id.d.ts81 B

Questions

How many files are in socket.io?

Version 4.8.4 of socket.io publishes 28 files of source, 513 KB in all, not counting images, fonts and source maps.

Does socket.io use eval?

No: socket.io doesn't call eval() anywhere in its published files.

Does socket.io start other programs?

No: socket.io doesn't use child_process anywhere in its published files.

Does socket.io run an install script?

No: socket.io has no preinstall, install or postinstall script in its package.json.

npm packages that use…

Every package we've indexed →

Search your own code like this

The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.

See StackGrep Engine