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

@statflo/socket

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@statflo/socket

A socket class for Stomp using SockJS

  • 3.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
1
Weekly downloads
 
Created
Source

@statflo/socket

A promised StompJS and SockJS class for managing subscriptions easily.

Usage

import SocketService from '@statflo/socket';

const service = new SocketService('http://foo.bar/live', { connectHeader: 'foobar' }); // where { connectHeader } is an instance of Stomp.StompHeaders

service.connect()
    .then(frame => {
        console.log(frame);
    })
    .catch(error => {
        console.error(error);
    });

Subscription

const exchange = service.subscribe('foo/bar', function(message) {
    console.log(message);
});
exchange.unsubscribe('foo/bar');

Messaging

service.message('foo/bar', 'Hello world!');

License

MIT Statflo Inc.

FAQs

Package last updated on 03 Jul 2019

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