_checkParameters(data, requiredParams = ['index', 'collection']) {
    data = data || {};
    try {
      requiredParams.forEach(param => {
        if (data[param] === null || data[param] === undefined) {
          throw new Error(`No ${param} provided`);
        }
        if (typeof data[param] === 'string' && data[param].trim() === '') {
          throw new Error(`Empty ${param} provided`);
        }
        if (typeof data[param] === 'object' && !Object.keys(data[param]).length) {
          throw new Error(`Empty ${param} provided`);
        }
      });
    } catch(e) {
      return e;
    }
    return true;
  }
/**
   * Check if the required parameters are present and non empty
   * @param data
   * @param requiredParams
   * @private
   */
Check if the required parameters are present and non empty
@param data
@param requiredParams
@private
Check if the required parameters are present and non empty @param data @param requiredParams @private
_checkParameters(data, requiredParams = ['index', 'collection']) {
    data = data || {};
    try {
      requiredParams.forEach(param => {
        if (data[param] === null || data[param] === undefined) {
          throw new Error(`No ${param} provided`);
        }
        if (typeof data[param] === 'string' && data[param].trim() === '') {
          throw new Error(`Empty ${param} provided`);
        }
        if (typeof data[param] === 'object' && !Object.keys(data[param]).length) {
          throw new Error(`Empty ${param} provided`);
        }
      });
    } catch(e) {
      return e;
    }
    return true;
  }
_checkParameters ( data , requiredParams = [ 'index' , 'collection' ] ) { data = data || { } ; try { requiredParams . forEach ( param => { if ( data [ param ] === null || data [ param ] === undefined ) { throw new Error ( ` ${ param } ` ) ; } if ( typeof data [ param ] === 'string' && data [ param ] . trim ( ) === '' ) { throw new Error ( ` ${ param } ` ) ; } if ( typeof data [ param ] === 'object' && ! Object . keys ( data [ param ] ) . length ) { throw new Error ( ` ${ param } ` ) ; } } ) ; } catch ( e ) { return e ; } return true ; }
Check if the required parameters are present and non empty
 @param data
 @param requiredParams
 @private
Check if the required parameters are present and non empty @param data @param requiredParams @private