export const locateHead = ( inputDocument ) : string | undefined => { if ( ! inputDocument ) { return undefined ; } const head = inputDocument . querySelector ( 'head' ) ; return head ?. innerHTML ; } ;