export type TemplateParameter = unknown [ ] ; function template < T > ( templateData , param , delimiter = '\n' ) { let output = '' ; for ( let i = 0 ; i < param . length ; i += 1 ) { output += templateData [ i ] + param [ i ] ; } output += templateData [ param . length ] ; const lines = output . split ( /(?:\r\n|\n|\r)/ ) ; return lines . map ( ( text ) => text . replace ( /^\s+/gm , '' ) ) . join ( delimiter ) . trim ( ) ; } export function pre ( templateData , ... param ) { return template ( templateData , param , '\n' ) ; } export function line ( templateData , ... param ) { return template ( templateData , param , ' ' ) ; } export function isObject < T > ( value ) { return value !== null && typeof value === 'object' && Array . isArray ( value ) === false ; }