src/line-header.js
function getRealHeaderCheck(expectedHeader, caseSensitive, fieldNames) {

	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
		return _getRealHeader(expectedHeader, actualHeader, fieldNames);
	};
}
function getRealHeaderCheck(expectedHeader, caseSensitive, fieldNames) {

	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
		return _getRealHeader(expectedHeader, actualHeader, fieldNames);
	};
}
function getRealHeaderCheck ( expectedHeader , caseSensitive , fieldNames ) { 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 return _getRealHeader ( expectedHeader , actualHeader , fieldNames ) ; } ; }
Creates a check which will match the future columns names to there real position
@param expectedHeader The expected header
@param caseSensitive Is the header case sensitive
@param fieldNames The fieldNames to use for each field.
@return fieldMap This maps the fieldNames to the position in the array.
Creates a check which will match the future columns names to there real position