src/line-header.js
function getMissingColumnCheck(expectedHeader, caseSensitive, severity) {

	return function (content) {
		let actualHeader;
		if (caseSensitive) {
			actualHeader = content;
		} else {
			actualHeader = arrayToUpperCase(content);
			expectedHeader = arrayToUpperCase(expectedHeader);
		}

		// the header must have all the expected columns but may have more
		let err = _missingColumns(expectedHeader, actualHeader);
		if (err) {
			return {
				errorCode: 'CHECK_HEADER_MISSING_COLUMNS',
				severity: severity,
				message: 'The following columns are missing in the header: [' + err.join() + ']'
			};
		}
	};
}
function getMissingColumnCheck(expectedHeader, caseSensitive, severity) {

	return function (content) {
		let actualHeader;
		if (caseSensitive) {
			actualHeader = content;
		} else {
			actualHeader = arrayToUpperCase(content);
			expectedHeader = arrayToUpperCase(expectedHeader);
		}

		// the header must have all the expected columns but may have more
		let err = _missingColumns(expectedHeader, actualHeader);
		if (err) {
			return {
				errorCode: 'CHECK_HEADER_MISSING_COLUMNS',
				severity: severity,
				message: 'The following columns are missing in the header: [' + err.join() + ']'
			};
		}
	};
}
function getMissingColumnCheck ( expectedHeader , caseSensitive , severity ) { return function ( content ) { let actualHeader ; if ( caseSensitive ) { actualHeader = content ; } else { actualHeader = arrayToUpperCase ( content ) ; expectedHeader = arrayToUpperCase ( expectedHeader ) ; } // the header must have all the expected columns but may have more let err = _missingColumns ( expectedHeader , actualHeader ) ; if ( err ) { return { errorCode : 'CHECK_HEADER_MISSING_COLUMNS' , severity : severity , message : 'The following columns are missing in the header: [' + err . join ( ) + ']' } ; } } ; }
Creates the missing column check
@param expectedHeader The expected header
@param caseSensitive Is the header case sensitive
@param severity The severity if the check fails
Creates the missing column check