Socket
Socket
Sign inDemoInstall

airfone-client-js

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airfone-client-js - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

3

lib/index.d.ts

@@ -8,3 +8,4 @@ export declare type StatusEvent = 'connect' | 'disconnect' | 'online' | 'offline' | 'error';

readonly room: String;
constructor(id: String, role: String, room: String, server?: String);
readonly token?: String;
constructor(id: String, role: String, room: String, server?: String, token?: String);
}

@@ -11,0 +12,0 @@ /**

@@ -12,3 +12,3 @@ import { io } from 'socket.io-client';

export class ClientOptions {
constructor(id, role, room, server) {
constructor(id, role, room, server, token) {
this.id = id;

@@ -18,2 +18,3 @@ this.role = role;

this.server = server;
this.token = token;
}

@@ -29,9 +30,13 @@ }

connect() {
let { id, room, role, server } = this.options;
let { id, room, role, server, token } = this.options;
this.state = 1;
this.socket = io(`${win.AF_SERVER || server || '/'}`, {
let opts = {
query: { id, room, role },
transports: ['websocket'],
secure: true
}).compress(true).on('connect', () => {
};
if (token) {
opts.auth = { token };
}
this.socket = io(`${win.AF_SERVER || server || '/'}`, opts).compress(true).on('connect', () => {
var _a;

@@ -38,0 +43,0 @@ this.state = 2;

{
"name": "airfone-client-js",
"version": "0.0.8",
"version": "0.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/index",

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