function validateCollectorNames(collectorNames) {
  if (common.checkDuplicatesInStringArray(collectorNames)) {
    const err = new dbErrors.DuplicateCollectorError();
    err.resourceType = 'Collector';
    err.resourceKey = collectorNames;
    return Promise.reject(err);
  }

  return Promise.resolve();
}
/**
 * Reject the request if collectorNames contain duplicate names
 * @param {Array} collectorNames Array of strings
 * @returns {Promise} empty if validation passed, reject otherwise
 */
Reject the request if collectorNames contain duplicate names
@param {Array} collectorNames Array of strings
@returns {Promise} empty if validation passed, reject otherwise
Reject the request if collectorNames contain duplicate names @param { Array } collectorNames Array of strings @returns { Promise } empty if validation passed reject otherwise
function validateCollectorNames(collectorNames) {
  if (common.checkDuplicatesInStringArray(collectorNames)) {
    const err = new dbErrors.DuplicateCollectorError();
    err.resourceType = 'Collector';
    err.resourceKey = collectorNames;
    return Promise.reject(err);
  }
  return Promise.resolve();
}
function validateCollectorNames ( collectorNames ) { if ( common . checkDuplicatesInStringArray ( collectorNames ) ) { const err = new dbErrors . DuplicateCollectorError ( ) ; err . resourceType = 'Collector' ; err . resourceKey = collectorNames ; return Promise . reject ( err ) ; } return Promise . resolve ( ) ; }
Reject the request if collectorNames contain duplicate names
 @param {Array} collectorNames Array of strings
 @returns {Promise} empty if validation passed, reject otherwise
Reject the request if collectorNames contain duplicate names @param { Array } collectorNames Array of strings @returns { Promise } empty if validation passed reject otherwise