import { toLaxTitleCase } from '@frogpond/titlecase' ; export function trimStationName ( stationName ) { return stationName . replace ( /<strong>@(.*)<\/strong>/u , '$1' ) ; } function removeParenTags ( str ) { let parensRegex = /\s?\([^)]*?\)\s?$/u ; while ( str . match ( parensRegex ) ) { str = str . replace ( parensRegex , '' ) ; } return str ; } export function trimItemLabel ( label ) { let evenedWhitespace = label . replace ( /\s+/gu , ' ' ) ; let noParens = removeParenTags ( evenedWhitespace ) ; return toLaxTitleCase ( noParens ) ; }