1 | (function (factory) {
|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
3 | var v = factory(require, exports);
|
4 | if (v !== undefined) module.exports = v;
|
5 | }
|
6 | else if (typeof define === "function" && define.amd) {
|
7 | define(["require", "exports"], factory);
|
8 | }
|
9 | })(function (require, exports) {
|
10 | "use strict";
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | exports.isChannel = void 0;
|
13 | var BaseChannel = (function () {
|
14 | function BaseChannel(options) {
|
15 | this.url = options.url;
|
16 | this.sessionId = options.sessionId;
|
17 | }
|
18 | BaseChannel.prototype.sendMessage = function (name, data) {
|
19 | return this._sendData(name, data);
|
20 | };
|
21 | return BaseChannel;
|
22 | }());
|
23 | exports.default = BaseChannel;
|
24 | function isChannel(value) {
|
25 | return (value &&
|
26 | typeof value === 'object' &&
|
27 | typeof value.sendMessage === 'function');
|
28 | }
|
29 | exports.isChannel = isChannel;
|
30 | });
|
31 |
|
\ | No newline at end of file |