New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

loop-ws-client

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loop-ws-client

"Loop/Mattermost TypeScript websocket client"

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

loop-ws-client

Simple, robust TypeScript WebSocket client for Loop/Mattermost.

По-русски

What's inside?

  • Automatic reconnects with jitter (because thundering herds are bad)
  • Handling of missed messages (syncs automagically)
  • Typed events for your pleasure
  • Compatible both with node and browser environments

Usage

Grab it:

npm install loop-ws-client

Or via pnpm

pnpm install loop-ws-client

Or via yarn

yarn add loop-ws-client

Or via bun

bun add loop-ws-client

Use it:

import { WebSocketClient } from 'loop-ws-client';

const client = new WebSocketClient({
    url: 'wss://your-loop.loop.ru/api/v4/websocket',
    token: 'your-auth-token'
});

// Connect
client.init();

// Add listeners
client.listeners.message.add((msg) => console.log('Got message:', msg));
client.listeners.firstConnect.add(() => console.log('We are live!'));
client.listeners.reconnect.add(() => console.log('And we are back!'));
client.listeners.close.add((failCount) => console.log(`Connection died. Fail count: ${failCount}`));

// Send updates
client.update.presence.thread(true, 'channel_id', 'parent_id');
client.update.userActiveStatus(true, true);
client.send.notifyAck('post_id', 'status', 'reason');

Contributing

PRs and feature requests are welcome. Don't break the build.

FAQs

Package last updated on 16 Feb 2026

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