remove(target) {
    let records;

    if (typeof target === "undefined") {
      this._records = [];
      this.identityManager.reset();
    } else if (typeof target === "number" || typeof target === "string") {
      let record = this._findRecord(target);
      let index = this._records.indexOf(record);
      this._records.splice(index, 1);
    } else if (Array.isArray(target)) {
      records = this._findRecords(target);
      records.forEach((record) => {
        let index = this._records.indexOf(record);
        this._records.splice(index, 1);
      });
    } else if (typeof target === "object") {
      records = this._findRecordsWhere(target);
      records.forEach((record) => {
        let index = this._records.indexOf(record);
        this._records.splice(index, 1);
      });
    }
  }
Removes one or more records in *collection*.

    If *target* is undefined, removes all records. If *target* is a number or string, removes a single record using *target* as id. If *target* is a POJO, queries *collection* for records that match the key-value pairs in *target*, and removes them from the collection.

    ```js
    // Given users = [
    //   {id: 1, name: 'Link'},
    //   {id: 2, name: 'Zelda'}
    // ]

    db.users.remove(); // db.users = []
    db.users.remove(1); // db.users = [{id: 2, name: 'Zelda'}]
    db.users.remove({name: 'Zelda'}); // db.users = [{id: 1, name: 'Link'}]
    ```

    @method remove
    @param target
    @public