import sanitize from 'sanitize-filename' ; export const sanitizeTitle = ( title ) : string => { const santizedTitle = title . replace ( /[':#|]/g , '' ) . trim ( ) ; return sanitize ( santizedTitle ) ; } ; export const sanitizeTitleExcess = ( title ) : string => { const santizedTitle = title . replace ( / *\([^)]*\) */g , '' ) . replace ( /:.*/g , '' ) . trim ( ) ; return sanitize ( santizedTitle ) ; } ;