Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Discovery.prototype.sendEventTo = function(dest, eventName, data) {
if (!is.nonEmptyStr(dest) && !is.nonEmptyArray(dest) &&
!is.function(dest)) {
debug('Discovery.sendEventTo received bad dest parameter: '+
inspect(dest));
return false;
}
if (!is.nonEmptyStr(eventName)) {
debug('Discovery.sendEventTo received bad name parameter: '+
inspect(eventName));
return false;
}
var i;
// handle the case where dest is a service name
if (is.nonEmptyStr(dest)) {
this.sendEventToService(dest, eventName, data);
} else if (is.nonEmptyArray(dest)) {
}
if (!is.nonEmptyStr(eventName)) {
debug('Discovery.sendEventTo received bad name parameter: '+
inspect(eventName));
return false;
}
var i;
// handle the case where dest is a service name
if (is.nonEmptyStr(dest)) {
this.sendEventToService(dest, eventName, data);
} else if (is.nonEmptyArray(dest)) {
for (i=0; i