Installations
npm install @d-fischer/isomorphic-ws
Developer Guide
Typescript
No
Module System
CommonJS, ESM, UMD
Node Version
20.5.1
NPM Version
9.8.0
Score
70.9
Supply Chain
84.1
Quality
76.7
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
d-fischer
Download Statistics
Total Downloads
441,050
Last Day
420
Last Week
1,217
Last Month
5,476
Last Year
65,313
GitHub Statistics
2 Stars
59 Commits
1 Forks
2 Watching
4 Branches
1 Contributors
Bundle Size
652.00 B
Minified
332.00 B
Minified + Gzipped
Package Meta Information
Latest Version
7.0.2
Package Id
@d-fischer/isomorphic-ws@7.0.2
Unpacked Size
5.51 kB
Size
2.36 kB
File Count
8
NPM Version
9.8.0
Node Version
20.5.1
Publised On
20 Feb 2024
Total Downloads
Cumulative downloads
Total Downloads
441,050
Last day
91.8%
420
Compared to previous day
Last week
-6.2%
1,217
Compared to previous week
Last month
17.7%
5,476
Compared to previous month
Last year
-17.2%
65,313
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
isomorphic-ws
Isomorphic implementation of WebSocket.
It uses:
- ws on Node
- global.WebSocket in browsers
Limitations
Before using this module you should know that
ws
is not perfectly API compatible with
WebSocket,
you should always test your code against both Node and browsers.
Some major differences:
- no
Server
implementation in browsers - no support for the constructor
options
argument in browsers
Usage
You need to install both this package and ws:
> npm i @d-fischer/isomorphic-ws ws
Then just require this package:
1const WebSocket = require('@d-fischer/isomorphic-ws') 2 3const ws = new WebSocket('wss://echo.websocket.org/'); 4 5ws.onopen = function open() { 6 console.log('connected'); 7 ws.send(Date.now()); 8}; 9 10ws.onclose = function close() { 11 console.log('disconnected'); 12}; 13 14ws.onmessage = function incoming(data) { 15 console.log(`Roundtrip time: ${Date.now() - data.data} ms`); 16 17 setTimeout(function timeout() { 18 ws.send(Date.now()); 19 }, 500); 20};
License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Reason
Found 3/26 approved changesets -- score normalized to 1
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Score
3
/10
Last Scanned on 2025-01-27
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