src/line-header.js
function getMandatoryColumnCheck(mandatoryColumns, severity) {

	/**
	 * @param the coluns found and matched.
	 */
	return function (foundColumns) {

		// the header must have all the expected columns but may have more
		let err = _missingColumns(mandatoryColumns, foundColumns);
		if (err) {
			return {
				errorCode: 'CHECK_HEADER_MANDATORY_COLUMNS',
				severity: severity,
				message: 'The following columns are missing in the header and are mandatory: [' + err.join() + ']'
			};
		}
	};
}
function getMandatoryColumnCheck(mandatoryColumns, severity) {

	/**
	 * @param the coluns found and matched.
	 */
	return function (foundColumns) {

		// the header must have all the expected columns but may have more
		let err = _missingColumns(mandatoryColumns, foundColumns);
		if (err) {
			return {
				errorCode: 'CHECK_HEADER_MANDATORY_COLUMNS',
				severity: severity,
				message: 'The following columns are missing in the header and are mandatory: [' + err.join() + ']'
			};
		}
	};
}
function getMandatoryColumnCheck ( mandatoryColumns , severity ) { /**
	 * @param the coluns found and matched.
	 */ return function ( foundColumns ) { // the header must have all the expected columns but may have more let err = _missingColumns ( mandatoryColumns , foundColumns ) ; if ( err ) { return { errorCode : 'CHECK_HEADER_MANDATORY_COLUMNS' , severity : severity , message : 'The following columns are missing in the header and are mandatory: [' + err . join ( ) + ']' } ; } } ; }
Creates the mandatory column check. This is every time case sensitive as we used the associated column names.
@param mandatoryColumns The mandatory columns. BUT these are the associated fieldnames, not the original column names
@param severity The severity if the check fails
Creates the mandatory column check . This is every time case sensitive as we used the associated column names .