function filter( list, type, include, isArrInc, exclude, isArrExc ) {
	var ALIAS_FLG;
	var VALUE_FLG;
	var FLG;
	var v;
	var i;
	var j;

	if ( type === '*' ) {
		ALIAS_FLG = true;
		VALUE_FLG = true;
	} else if ( type === 'alias' ) {
		ALIAS_FLG = true;
	} else {
		VALUE_FLG = true;
	}
	// Perform list "compression" without using temporary data structures...
	j = 0;
	for ( i = 0; i < list.length; i += 3 ) {
		v = list[ i ];
		FLG = false;

		// Note: exclude/include order matters!!!
		if ( exclude ) {
			if ( isArrExc ) {
				if ( ALIAS_FLG && contains( exclude, v ) ) {
					// The alias is in the explicit exclude list:
					FLG = true;
				} else if ( VALUE_FLG && contains( exclude, list[ i+1 ] ) ) {
					// The value is in the explicit exclude list:
					FLG = true;
				}
			} else if ( exclude.test( v ) ) {
				// The alias passes the exclusion test:
				FLG = true;
			}
		}
		// Only apply inclusion filters if the alias has not been already excluded from deletion...
		if ( FLG === false && include ) {
			if ( isArrInc ) {
				if ( ALIAS_FLG && !contains( include, v ) ) {
					// The alias is *not* in the include list:
					FLG = true;
				} else if ( VALUE_FLG && !contains( include, list[ i+1 ] ) ) {
					// The value is *not* in the include list:
					FLG = true;
				}
			} else if ( !include.test( v ) ) {
				// The alias does *not* pass the include test:
				FLG = true;
			}
		}
		if ( FLG ) {
			list[ j ] = list[ i ];
			list[ j+1 ] = list[ i+1 ];
			list[ j+2 ] = list[ i+2 ];
			j += 3;
		}
	}
	list.length = j;
	return list;
}
Filters user-defined documentation based on include and exclude filters.

@private
@param {Array} list - documentation to filter
@param {string} type - filter type
@param {(RegExp|ArrayLikeObject|void)} include - name inclusion filter
@param {boolean} isArrInc - boolean indicating whether the inclusion filter is an array
@param {(RegExp|ArrayLikeObject|void)} exclude - name exclusion filter
@param {boolean} isArrExc - boolean indicating whether the exclusion filter is an array
@returns {Array} reference to input array