build/rekord.js
function(models, delaySort, remoteData)
  {
    if ( isArray( models ) )
    {
      var indices = [];

      for (var i = 0; i < models.length; i++)
      {
        var model = this.parseModel( models[ i ], remoteData );
        var key = model.$key();

        this.map.put( key, model );
        indices.push( this.map.indices[ key ] );
      }

      this.trigger( Collection.Events.Adds, [this, models, indices] );

      if ( !delaySort )
      {
        this.sort();
      }
    }
  }
function(models, delaySort, remoteData)
  {
    if ( isArray( models ) )
    {
      var indices = [];

      for (var i = 0; i < models.length; i++)
      {
        var model = this.parseModel( models[ i ], remoteData );
        var key = model.$key();

        this.map.put( key, model );
        indices.push( this.map.indices[ key ] );
      }

      this.trigger( Collection.Events.Adds, [this, models, indices] );

      if ( !delaySort )
      {
        this.sort();
      }
    }
  }
function ( models , delaySort , remoteData ) { if ( isArray ( models ) ) { var indices = [ ] ; for ( var i = 0 ; i < models . length ; i ++ ) { var model = this . parseModel ( models [ i ] , remoteData ) ; var key = model . $key ( ) ; this . map . put ( key , model ) ; indices . push ( this . map . indices [ key ] ) ; } this . trigger ( Collection . Events . Adds , [ this , models , indices ] ) ; if ( ! delaySort ) { this . sort ( ) ; } } }
Adds all models in the given array to this collection - sorting the
collection if a comparator is set on this collection and `delaySort` is
not specified or a true value.

@method
@memberof Rekord.ModelCollection#
@param {modelInput[]} models -
The models to add to this collection.
@param {Boolean} [delaySort=false] -
Whether automatic sorting should be delayed until the user manually
calls {@link Rekord.ModelCollection#sort sort}.
@param {Boolean} [remoteData=false] -
If the model is from a remote source. Remote sources place the model
directly into the database while local sources aren't stored in the
database until they're saved.
@return {Rekord.ModelCollection} -
The reference to this collection.
@emits Rekord.ModelCollection#adds
@emits Rekord.ModelCollection#sort
Adds all models in the given array to this collection - sorting the collection if a comparator is set on this collection and delaySort is not specified or a true value .