revert (opts) {
    const previous = this._get('previous')
    opts || (opts = {})
    opts.preserve || (opts.preserve = [])
    utils.forOwn(this, (value, key) => {
      if (key !== this._mapper().idAttribute && !Object.hasOwnProperty.call(previous, key) && Object.hasOwnProperty.call(this, key) && opts.preserve.indexOf(key) === -1) {
        delete this[key]
      }
    })
    utils.forOwn(previous, (value, key) => {
      if (opts.preserve.indexOf(key) === -1) {
        this[key] = value
      }
    })
    this.commit()
  }
Revert changes to this record back to the properties it had when it was
instantiated.

@example <caption>Record#revert</caption>
const JSData = require('js-data');
const { Container } = JSData;
console.log('Using JSData v' + JSData.version.full);
const store = new Container();
store.defineMapper('user');
const user = store.createRecord('user', {
  name: 'William'
});
console.log('user: ' + JSON.stringify(user));
user.name = 'Bob';
console.log('user: ' + JSON.stringify(user));
user.revert();
console.log('user: ' + JSON.stringify(user));

@method Record#revert
@param {object} [opts] Configuration options.
@param {string[]} [opts.preserve] Array of strings or Regular Expressions
denoting properties that should not be reverted.
@since 3.0.0