Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_setupEndpointListeners(endpoint, on) {
Object.keys(Voximplant.EndpointEvents).forEach((eventName) => {
const callbackName = `_onEndpoint${eventName}`;
if (typeof this[callbackName] !== 'undefined') {
endpoint[(on) ? 'on' : 'off'](eventName, this[callbackName]);
}
});
}