0.1.7 • Published 5 years ago

@xmess/core v0.1.7

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

@xmess/core

Table of contents

  1. Description
  2. Installation
  3. Usage
  4. API

Description


Installation


  1. Installing project dependency
$ npm i @xmess/core --save
  1. Import Xmess, and provide base configuration
import { Xmess } from '@xmess/core';

const xmess = new Xmess('some-id');

Usage


import { IChannelMessage } from '@xmess/core/dist/types';

const sentMessageList: Array<IChannelMessage> = [];

xmess.channel('#').subscribe((message) => {
  sentMessageList.push(message);
});

function sendMessage(channelPath, payload) {
  xmess.channel(channelPath).publish();
}

API


0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.4

5 years ago