
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
cometd-nodejs-client
Advanced tools
Adapter code to run the CometD JavaScript library in a NodeJS environment
This project implements ES6 adapter code that allows the CometD JavaScript Client to run in NodeJS 18.x or greater.
The adapter code exports an implementation of XMLHttpRequest
and WebSocket
so that the CometD JavaScript Client works in NodeJS as it does within a browser environment.
WebSocket is supported via the ws
package.
Install the CometD NodeJS Client:
npm install cometd-nodejs-client
import { adapt } from "cometd-nodejs-client";
import { CometD } from "cometd";
// Shim XMLHTTPRequest for Node.js (required by CometD).
adapt();
// Your normal CometD client application here.
const client = new CometD();
See here for an example CometD client application.
FAQs
Adapter code to run the CometD JavaScript library in a NodeJS environment
The npm package cometd-nodejs-client receives a total of 4,377 weekly downloads. As such, cometd-nodejs-client popularity was classified as popular.
We found that cometd-nodejs-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.