"use strict";

const _ = require( 'underscore' );
const Backbone = require( 'backbone' );
Backbone.LocalStorage = require( "backbone.localstorage" );
//require( 'backbone-event-logger' );

const VariableRowModel = require( '../models/dirPickerVariableRow' );

//noinspection JSUnusedGlobalSymbols
/**
 * @class
 * @extends {Backbone.Collection}
 */
const CollectionsDirPickerVariableList = Backbone.Collection.extend( {
  initialize: function () {
    //this.debugEvents('CollectionsVariableList');
  },
  model     : VariableRowModel,
  comparator: 'sort'
} );
_.extend( CollectionsDirPickerVariableList.prototype, require( './mixin' ) );

module.exports = CollectionsDirPickerVariableList;

"use strict";

import DirPickerCollectionBase from './dirPickerCollectionBase';
import VariableRowModel from '../models/dirPickerVariableRow'

export default class DirPickerVariableList extends DirPickerCollectionBase {

  /**
   * @param {object} [attr]
   * @param {object} [options]
   */
  constructor ( attr, options ) {
    super( attr, options );

    /**
     *
     * @type {VariableRowModel}
     */
    this.model = VariableRowModel;

    //noinspection JSUnusedGlobalSymbols
    /**
     *
     * @type {string}
     */
    this.comparator = 'sort'

  }

  //noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols,JSUnusedLocalSymbols
  /**
   *
   * @param {object} [attr]
   * @param {object} [options]
   */
  initialize ( attr, options ) {
    this.debugEvents( 'CollectionsVariableList' );
  }

}

Refactor to ES6