
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
js-streaming
Advanced tools
Unified streaming client for WebSocket, SSE, HTTP streaming, long-polling, HLS, and WebRTC.
Universal, type-safe streaming client for JavaScript. Supports WebSocket, SSE, HTTP streaming, long-polling, HLS video, WebRTC, and Socket.IO under one unified API. Includes smart reconnection, typed events, React/Vue hooks, and cross-platform support.
npm install js-streaming
# Optional peer dependencies:
npm install hls.js socket.io-client react vue
import { createStream } from "js-streaming";
const stream = createStream({
type: "websocket",
url: "wss://api.example.com/ws",
});
// Events
stream.on("open", () => console.log("Connected"));
stream.on("message", (data) => console.log("Data:", data));
stream.on("error", (err) => console.error("Error:", err));
stream.on("close", () => console.log("Closed"));
// Use
await stream.open();
stream.send({ hello: "server" });
// WebSocket
createStream({ type: "websocket", url: "wss://example.com" });
// Server-Sent Events
createStream({ type: "sse", url: "https://example.com/events" });
// HTTP Streaming
createStream({ type: "http", url: "https://example.com/stream" });
// Long Polling
createStream({
type: "long-polling",
url: "https://example.com/poll",
interval: 1000,
});
// HLS Video
createStream({
type: "hls",
url: "https://example.com/video.m3u8",
video: document.querySelector("video"),
});
// WebRTC
createStream({ type: "webrtc", createPeer: () => new RTCPeerConnection() });
// Socket.IO
createStream({ type: "socketio", url: "https://example.com" });
React
import { useStream } from "js-streaming/react";
const { messages, isOpen, send } = useStream({
type: "websocket",
url: "wss://chat.example.com",
});
Vue
<script setup>
import { useStream } from "js-streaming/vue";
const { messages, isOpen, send } = useStream({
type: "sse",
url: "https://events.example.com",
});
</script>
const stream = createStream({
type: "websocket",
url: "wss://unstable-server.com",
autoReconnect: true,
maxRetries: 5,
backoff: { baseMs: 500, maxMs: 15000, factor: 2, jitter: true },
});
stream.on("status", (s) => console.log("Status:", s));
open() / close() → manage connectionsend(data) → send payloads (WebSocket / WebRTC / Socket.IO)on(event, cb) / off(event, cb) → listen to open | close | error | message | statusstate → current status, retries, buffer, errorshls.js), Socket.IO (via socket.io-client)MIT © Kerolos Zakaria
FAQs
Unified streaming client for WebSocket, SSE, HTTP streaming, long-polling, HLS, and WebRTC.
We found that js-streaming 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.