function matchTags(rule, runOnly) {
	'use strict';
	var include, exclude, matching;
	var defaultExclude =
		axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];

	// normalize include/exclude
	if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {
		// Wrap include and exclude if it's not already an array
		include = runOnly.include || [];
		include = Array.isArray(include) ? include : [include];

		exclude = runOnly.exclude || [];
		exclude = Array.isArray(exclude) ? exclude : [exclude];
		// add defaults, unless mentioned in include
		exclude = exclude.concat(
			defaultExclude.filter(function(tag) {
				return include.indexOf(tag) === -1;
			})
		);

		// Otherwise, only use the include value, ignore exclude
	} else {
		include = Array.isArray(runOnly) ? runOnly : [runOnly];
		// exclude the defaults not included
		exclude = defaultExclude.filter(function(tag) {
			return include.indexOf(tag) === -1;
		});
	}

	matching = include.some(function(tag) {
		return rule.tags.indexOf(tag) !== -1;
	});
	if (matching || (include.length === 0 && rule.enabled !== false)) {
		return exclude.every(function(tag) {
			return rule.tags.indexOf(tag) === -1;
		});
	} else {
		return false;
	}
}
function matchTags(rule, runOnly) {
	'use strict';
	var include, exclude, matching;
	var defaultExclude =
		axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];

	// normalize include/exclude
	if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {
		// Wrap include and exclude if it's not already an array
		include = runOnly.include || [];
		include = Array.isArray(include) ? include : [include];

		exclude = runOnly.exclude || [];
		exclude = Array.isArray(exclude) ? exclude : [exclude];
		// add defaults, unless mentioned in include
		exclude = exclude.concat(
			defaultExclude.filter(function(tag) {
				return include.indexOf(tag) === -1;
			})
		);

		// Otherwise, only use the include value, ignore exclude
	} else {
		include = Array.isArray(runOnly) ? runOnly : [runOnly];
		// exclude the defaults not included
		exclude = defaultExclude.filter(function(tag) {
			return include.indexOf(tag) === -1;
		});
	}

	matching = include.some(function(tag) {
		return rule.tags.indexOf(tag) !== -1;
	});
	if (matching || (include.length === 0 && rule.enabled !== false)) {
		return exclude.every(function(tag) {
			return rule.tags.indexOf(tag) === -1;
		});
	} else {
		return false;
	}
}
function matchTags ( rule , runOnly ) { 'use strict' ; var include , exclude , matching ; var defaultExclude = axe . _audit && axe . _audit . tagExclude ? axe . _audit . tagExclude : [ ] ; // normalize include/exclude if ( runOnly . hasOwnProperty ( 'include' ) || runOnly . hasOwnProperty ( 'exclude' ) ) { // Wrap include and exclude if it's not already an array include = runOnly . include || [ ] ; include = Array . isArray ( include ) ? include : [ include ] ; exclude = runOnly . exclude || [ ] ; exclude = Array . isArray ( exclude ) ? exclude : [ exclude ] ; // add defaults, unless mentioned in include exclude = exclude . concat ( defaultExclude . filter ( function ( tag ) { return include . indexOf ( tag ) === - 1 ; } ) ) ; // Otherwise, only use the include value, ignore exclude } else { include = Array . isArray ( runOnly ) ? runOnly : [ runOnly ] ; // exclude the defaults not included exclude = defaultExclude . filter ( function ( tag ) { return include . indexOf ( tag ) === - 1 ; } ) ; } matching = include . some ( function ( tag ) { return rule . tags . indexOf ( tag ) !== - 1 ; } ) ; if ( matching || ( include . length === 0 && rule . enabled !== false ) ) { return exclude . every ( function ( tag ) { return rule . tags . indexOf ( tag ) === - 1 ; } ) ; } else { return false ; } }
Check if a rule matches the value of runOnly type=tag
@private
@param  {object} rule
@param  {object}	runOnly Value of runOnly with type=tags
@return {bool}
Check if a rule matches the value of runOnly type = tag
Match the tags in the rule