function DbIndex(keys, unique) {
    babelHelpers.classCallCheck(this, DbIndex);

    if (Object(keys) instanceof String) {
      var key = {};
      key[keys] = DbIndex.ASC;
      this.keys = [key];
    } else if (Object(keys) instanceof Array) {
      this.keys = keys;
    } else if (keys) {
      this.keys = [keys];
    } else {
      throw new Error("The keys parameter must be an String, Object or Array.");
    }

    /** @type boolean */
    this.drop = false;
    this.unique = unique === true;
  }
/**
   * @param {string|Object|Array<string>} keys The name of the field which will be used for the index,
   * an object of an field and index type combination or
   * an array of objects to create an compound index
   * @param {boolean=} unique Indicates if the index will be unique
   */
@param {string|Object|Array} keys The name of the field which will be used for the index,
an object of an field and index type combination or
an array of objects to create an compound index
@param {boolean=} unique Indicates if the index will be unique
@param { string|Object|Array } keys The name of the field which will be used for the index an object of an field and index type combination or an array of objects to create an compound index @param { boolean = } unique Indicates if the index will be unique
function DbIndex(keys, unique) {
    babelHelpers.classCallCheck(this, DbIndex);
    if (Object(keys) instanceof String) {
      var key = {};
      key[keys] = DbIndex.ASC;
      this.keys = [key];
    } else if (Object(keys) instanceof Array) {
      this.keys = keys;
    } else if (keys) {
      this.keys = [keys];
    } else {
      throw new Error("The keys parameter must be an String, Object or Array.");
    }
    this.drop = false;
    this.unique = unique === true;
  }
function DbIndex ( keys , unique ) { babelHelpers . classCallCheck ( this , DbIndex ) ; if ( Object ( keys ) instanceof String ) { var key = { } ; key [ keys ] = DbIndex . ASC ; this . keys = [ key ] ; } else if ( Object ( keys ) instanceof Array ) { this . keys = keys ; } else if ( keys ) { this . keys = [ keys ] ; } else { throw new Error ( "The keys parameter must be an String, Object or Array." ) ; } this . drop = false ; this . unique = unique === true ; }
@param {string|Object|Array<string>} keys The name of the field which will be used for the index,
 an object of an field and index type combination or
 an array of objects to create an compound index
 @param {boolean=} unique Indicates if the index will be unique
@param { string|Object|Array<string > } keys The name of the field which will be used for the index an object of an field and index type combination or an array of objects to create an compound index @param { boolean = } unique Indicates if the index will be unique
/** @type boolean */