ZPusher Client (v1.0.9) is a WebSocket client library for connecting to ZPusher servers. It provides an event-driven API with automatic reconnection, channel subscription, and promise-based connection management. The library ships as a single JavaScript file supporting both Node.js and browser environments via script tag or npm. Key features include configurable auto-connect, reconnect timeout, and support for custom event listeners (open, close, error, reconnect). The package has no additional dependencies but requires a valid token and WebSocket endpoint. Compared to alternatives like Socket.IO, ZPusher is minimal and focused specifically on ZPusher server protocol.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Library uses default export. CommonJS require may not work depending on your bundler; prefer ES module import for consistency.
In browser, include the dist/zpusher.js script. The global ZPusher constructor becomes available without any import statement.
The package does not ship TypeScript type definitions. Use @types or declare module manually. Named import with braces will fail.
Initializes ZPusher with endpoint and token, connects, subscribes to a channel, and listens for events.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.