param { Array } arr return export function compact ( arr ) { return arr . filter ( item => item ) ; } param { String } name return export function prepareName ( name ) { return name . replace ( /\{|\}/g , '' ) . trim ( ) ; } export function debounce ( func , wait ) { let timeout ; return ( ... args ) => { clearTimeout ( timeout ) ; timeout = setTimeout ( ( ) => { timeout = null ; func ( ... args ) ; } , wait ) ; } ; } ;