client/lib/plugins/utils.js
function filterNoticesBy( site, pluginSlug, log ) {
	if ( ! site && ! pluginSlug ) {
		return true;
	}
	if ( isSameSiteNotice( site, log ) && isSamePluginNotice( pluginSlug, log ) ) {
		return true;
	} else if ( ! pluginSlug && isSameSiteNotice( site, log ) ) {
		return true;
	} else if ( ! site && isSamePluginNotice( pluginSlug, log ) ) {
		return true;
	}
	return false;
}
function filterNoticesBy( site, pluginSlug, log ) {
	if ( ! site && ! pluginSlug ) {
		return true;
	}
	if ( isSameSiteNotice( site, log ) && isSamePluginNotice( pluginSlug, log ) ) {
		return true;
	} else if ( ! pluginSlug && isSameSiteNotice( site, log ) ) {
		return true;
	} else if ( ! site && isSamePluginNotice( pluginSlug, log ) ) {
		return true;
	}
	return false;
}
Filter function that return notices that fit a certain criteria.

@param  {Object} site       Site Object
@param  {String} pluginSlug Plugin Slug
@param  {Object} log        Notice log Object
@return {Bool} True if notice matches criteria