Code coverage report for lib\removeAndDo.js

Statements: 100% (7 / 7)      Branches: 100% (2 / 2)      Functions: 100% (1 / 1)      Lines: 100% (7 / 7)      Ignored: none     

All files » lib\ » removeAndDo.js
1 2 3 4 5 6 7 8 9 10 11 12 13        1 539 539 356 356 356   183  
/*
	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;
};