airfone-client-js
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -35,5 +35,6 @@ export declare type StatusEvent = 'connect' | 'disconnect' | 'online' | 'offline' | 'error'; | ||
broadcasts(payload: any): void; | ||
on(events: StatusEvent | MessageEvent | String | Array<StatusEvent | MessageEvent | String>, handle?: (payload: Payload) => void): AirfoneClient; | ||
onIf(bool: boolean, events: StatusEvent | MessageEvent | String | Array<StatusEvent | MessageEvent | String>, handle?: (payload: Payload) => void): this; | ||
on(events: StatusEvent | MessageEvent | String | Array<StatusEvent | MessageEvent | String>, handle?: (payload: Payload) => void): this; | ||
} | ||
export declare function getClient(options: ClientOptions): AirfoneClient; | ||
export {}; |
@@ -144,2 +144,8 @@ import { io } from 'socket.io-client'; | ||
} | ||
onIf(bool, events, handle = (payload) => { }) { | ||
if (bool) { | ||
return this.on(events, handle); | ||
} | ||
return this; | ||
} | ||
on(events, handle = (payload) => { }) { | ||
@@ -146,0 +152,0 @@ if (this.state != 0) { |
{ | ||
"name": "airfone-client-js", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9066
214