export class Utils { static replace ( str , obj ) { return str . replace ( /<%([\w\W][^%]+)%>/g , ( val , name ) => obj [ name ] ?? val ) ; } static toCamelCase ( str ) { return str . split ( /[,| -]+/ ) . filter ( v => ! ! v && ! ! v . trim ( ) ) . map ( ( part , index ) => index ? this . capitalize ( part , true ) : part . toLowerCase ( ) ) . join ( '' ) ; } static capitalize ( str , toLower = false ) { return str [ 0 ] . toUpperCase ( ) + ( toLower ? str . slice ( 1 ) . toLowerCase ( ) : str . slice ( 1 ) ) ; } }