function LocalStorage() {
    var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
    var serializer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultSerializer;

    _classCallCheck(this, LocalStorage);

    this.name = name;
    this.serializer = serializer;

    if (!this.localStorage) {
      throw 'Backbone.localStorage: Environment does not support localStorage.';
    }

    var store = this._getItem(this.name);
    this.records = store && store.split(',') || [];
  }
LocalStorage proxy class for Backbone models.
Usage:
  export const MyModel = Backbone.Model.extend({
    localStorage: new LocalStorage('MyModelName')
  });