New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cometd-nodejs-client

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cometd-nodejs-client

Adapter code to run the CometD JavaScript library in a NodeJS environment

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NodeJS CI

The CometD Project

CometD NodeJS Client

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.

NPM Installation

Install the CometD NodeJS Client:

npm install cometd-nodejs-client

Usage (ES6)

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.

Keywords

FAQs

Package last updated on 21 May 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc