src/lib/collections/list.js
function (match) {
        assertType(match, Function);

        var freeIndex = 0,
            len = this.length;

        while (freeIndex < len && !match(this[freeIndex])) {
            freeIndex++;
        }

        if (freeIndex >= len) {
            return 0;
        }

        var current = freeIndex + 1;

        while (current < len) {
            while (current < len && match(this[current])) {
                current++;
            }

            if (current < len) {
                this[freeIndex++] = this[current++];
            }
        }

        shrinkList(this, freeIndex);
        return len - freeIndex;
    }
function (match) {
        assertType(match, Function);

        var freeIndex = 0,
            len = this.length;

        while (freeIndex < len && !match(this[freeIndex])) {
            freeIndex++;
        }

        if (freeIndex >= len) {
            return 0;
        }

        var current = freeIndex + 1;

        while (current < len) {
            while (current < len && match(this[current])) {
                current++;
            }

            if (current < len) {
                this[freeIndex++] = this[current++];
            }
        }

        shrinkList(this, freeIndex);
        return len - freeIndex;
    }
function ( match ) { assertType ( match , Function ) ; var freeIndex = 0 , len = this . length ; while ( freeIndex < len && ! match ( this [ freeIndex ] ) ) { freeIndex ++ ; } if ( freeIndex >= len ) { return 0 ; } var current = freeIndex + 1 ; while ( current < len ) { while ( current < len && match ( this [ current ] ) ) { current ++ ; } if ( current < len ) { this [ freeIndex ++ ] = this [ current ++ ] ; } } shrinkList ( this , freeIndex ) ; return len - freeIndex ; }
Removes all the elements that match the conditions defined by the specified predicate.
@param {Function} match The predicate function that defines the conditions of the elements to remove. eg. function(item)
@returns {Number}
Removes all the elements that match the conditions defined by the specified predicate .