@xmess/core
v0.1.7
Published
> TODO: description
Downloads
3
Readme
@xmess/core
Table of contents
Description
Installation
- Installing project dependency
$ npm i @xmess/core --save
- 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();
}