lib/reporter.js
function buildReporterMethod(method, consoleMethod = 'log') {
	if (typeof method !== 'function') {
		method = () => {};
	}
	return async input => {
		const output = await method(input);
		if (output) {
			console[consoleMethod](output);
		}
	};
}
function buildReporterMethod(method, consoleMethod = 'log') {
	if (typeof method !== 'function') {
		method = () => {};
	}
	return async input => {
		const output = await method(input);
		if (output) {
			console[consoleMethod](output);
		}
	};
}
function buildReporterMethod ( method , consoleMethod = 'log' ) { if ( typeof method !== 'function' ) { method = ( ) => { } ; } return async input => { const output = await method ( input ) ; if ( output ) { console [ consoleMethod ] ( output ) ; } } ; }
Build a Pa11y reporter method, making it async and only outputting when
actual output is returned.
@private
@param {Function} method - The reporter method to build.
@param {String} [consoleMethod='log'] - The console method to use in reporting.
@returns {Function} Returns a built async reporter method.
Build a Pa11y reporter method making it async and only outputting when actual output is returned .