export function boxMessage ( lines ) { const lineLength = lines . reduce ( ( prev , curr ) => ( prev < curr . length ? curr . length : prev ) , 0 ) ; const sep = `+${ [ ... new Array ( lineLength ) ] . map ( ( ) => '-' ) . join ( '' ) }+` ; return [ '' , sep , ... lines . map ( line => ` ${ line } ` ) , sep ] . join ( '\n' ) ; }