build/rekord.js
function(values, delaySort, equals)
  {
    var removed = [];
    var removedIndices = [];

    if ( isArray( values ) && values.length )
    {
      for (var i = 0; i < values.length; i++)
      {
        var value = values[ i ];
        var k = this.indexOf( value, equals );

        if ( k !== -1 )
        {
          removedIndices.push( k );
          removed.push( value );
        }
      }

      removedIndices.sort();

      for (var i = removedIndices.length - 1; i >= 0; i--)
      {
        AP.splice.call( this, removedIndices[ i ], 1 );
      }

      this.trigger( Collection.Events.Removes, [this, removed, removedIndices] );

      if ( !delaySort )
      {
        this.sort( undefined, undefined, true );
      }
    }

    return removed;
  }
function(values, delaySort, equals)
  {
    var removed = [];
    var removedIndices = [];

    if ( isArray( values ) && values.length )
    {
      for (var i = 0; i < values.length; i++)
      {
        var value = values[ i ];
        var k = this.indexOf( value, equals );

        if ( k !== -1 )
        {
          removedIndices.push( k );
          removed.push( value );
        }
      }

      removedIndices.sort();

      for (var i = removedIndices.length - 1; i >= 0; i--)
      {
        AP.splice.call( this, removedIndices[ i ], 1 );
      }

      this.trigger( Collection.Events.Removes, [this, removed, removedIndices] );

      if ( !delaySort )
      {
        this.sort( undefined, undefined, true );
      }
    }

    return removed;
  }
function ( values , delaySort , equals ) { var removed = [ ] ; var removedIndices = [ ] ; if ( isArray ( values ) && values . length ) { for ( var i = 0 ; i < values . length ; i ++ ) { var value = values [ i ] ; var k = this . indexOf ( value , equals ) ; if ( k !== - 1 ) { removedIndices . push ( k ) ; removed . push ( value ) ; } } removedIndices . sort ( ) ; for ( var i = removedIndices . length - 1 ; i >= 0 ; i -- ) { AP . splice . call ( this , removedIndices [ i ] , 1 ) ; } this . trigger ( Collection . Events . Removes , [ this , removed , removedIndices ] ) ; if ( ! delaySort ) { this . sort ( undefined , undefined , true ) ; } } return removed ; }
Removes the given values from this collection - sorting the collection if
a comparator is set on this collection and `delaySort` is not specified or
a true value.

```javascript
var c = Rekord.collect(1, 2, 3, 4);
c.removeAll( [1, 5] ); // [1]
c // [2, 3, 4]
```

@method
@memberof Rekord.Collection#
@param {Any[]} values -
The values to remove from this collection if they exist.
@param {Boolean} [delaySort=false] -
Whether automatic sorting should be delayed until the user manually
calls {@link Rekord.Collection#sort sort}.
@param {equalityCallback} [equals=Rekord.equalsStrict] -
The function which determines whether one of the elements that exist in
this collection are equivalent to any of the given values.
@return {Any[]} -
The elements removed from this collection.
@emits Rekord.Collection#removes
@emits Rekord.Collection#sort
Removes the given values from this collection - sorting the collection if a comparator is set on this collection and delaySort is not specified or a true value .