import mapToNumeric from '../helpers/mapToNumeric' ; example param value const formatToCEP = ( value ) : string => ( mapToNumeric ( value ) . replace ( /(\d{5})(\d{1,3})/ , '$1-$2' ) ) ; export default formatToCEP ;