lib/core/utils/select.js
function isNodeInContext(node, context) {
	'use strict';

	var include =
		context.include &&
		getDeepest(
			context.include.filter(function(candidate) {
				return axe.utils.contains(candidate, node);
			})
		);
	var exclude =
		context.exclude &&
		getDeepest(
			context.exclude.filter(function(candidate) {
				return axe.utils.contains(candidate, node);
			})
		);
	if (
		(!exclude && include) ||
		(exclude && axe.utils.contains(exclude, include))
	) {
		return true;
	}
	return false;
}
function isNodeInContext(node, context) {
	'use strict';

	var include =
		context.include &&
		getDeepest(
			context.include.filter(function(candidate) {
				return axe.utils.contains(candidate, node);
			})
		);
	var exclude =
		context.exclude &&
		getDeepest(
			context.exclude.filter(function(candidate) {
				return axe.utils.contains(candidate, node);
			})
		);
	if (
		(!exclude && include) ||
		(exclude && axe.utils.contains(exclude, include))
	) {
		return true;
	}
	return false;
}
function isNodeInContext ( node , context ) { 'use strict' ; var include = context . include && getDeepest ( context . include . filter ( function ( candidate ) { return axe . utils . contains ( candidate , node ) ; } ) ) ; var exclude = context . exclude && getDeepest ( context . exclude . filter ( function ( candidate ) { return axe . utils . contains ( candidate , node ) ; } ) ) ; if ( ( ! exclude && include ) || ( exclude && axe . utils . contains ( exclude , include ) ) ) { return true ; } return false ; }
Determines if a node is included or excluded in a given context
@private
@param  {Node}  node     The node to test
@param  {Object}  context "Resolved" context object, @see resolveContext
@return {Boolean}         [description]
Determines if a node is included or excluded in a given context