mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			14 lines
		
	
	
		
			321 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			321 B
		
	
	
	
		
			JavaScript
		
	
	
	
/*
 | 
						|
	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
						|
	Author Tobias Koppers @sokra
 | 
						|
*/
 | 
						|
module.exports = function removeAndDo(collection, thing, action) {
 | 
						|
	var idx = this[collection].indexOf(thing);
 | 
						|
	if(idx >= 0) {
 | 
						|
		this[collection].splice(idx, 1);
 | 
						|
		thing[action](this);
 | 
						|
		return true;
 | 
						|
	}
 | 
						|
	return false;
 | 
						|
};
 |