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

realy-library

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

realy-library

Realy Realtime as a service library.

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Realy

npm package

Create realtime apps, easely.

Get Started now, it's free ➞

Realy is a realtime data delivery platform providing developers everything they need to create, deliver and manage complex projects.

Dead simple API

Realy have just 4 methods at moment. And i'ts very simple to use and get started.

import { init } from 'realy-library';

init('apiKey').then( socket => {

  socket.on('news', ( data ) => {
    console.log(data);
  });

  socket.emit('news', 'Realy is awesome!') 
  // #all users connected on your site will see this message
});

Methods:

/**
 * @name init
 * @description Initialize the event and connects the user
 * with the server to subscribe the events.
 * @return {Promise}
 * @param socket The socket instance, that have the 
 * methods .on, .emit and .disconnect
 */
Realy.init('apikey').then( socket => { 
  socket.on('event', () => { socket.emit('other event')});
  socket.on('other event'=> {
    console.log('All users connected on your application will see this message on console.')
  })
})

/**
 * @name on
 * @description      Register an event
 * @param {String}   event The event name that will be emitted.
 * @param {Function} callback The callback that will be called.
 * @return {void}
 */
Realy.on(event, callback);

/**
 * @name emit
 * @description      Emit an event to all connected users
 * @param {String}   event The event name that will be emitted.
 * @param {Any}      args  The arguments that you can pass in. Optionally.
 * @return {void}
 */
Realy.emit(event,  [...args]);

/**
 * @name disconnect
 * @description      Disconnect the user from your socket. The user
 * will not receive receive and emit events.
 * @return {void}
 */
Realy.disconnect();

FAQs

Package last updated on 24 Jan 2017

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