param { string } value function extractClassesFromNgClass ( value ) { const found = [ ] ; const rxp = /{([^}]+)}/g ; let curMatch ; while ( ( curMatch = rxp . exec ( value ) ) ) { found . push ( curMatch [ 1 ] . replace ( /\n/g , '' ) . replace ( / /g , '' ) ) ; } let classes = [ ] ; if ( found . length > 0 ) { classes = found [ 0 ] . split ( ',' ) . map ( e => e . split ( ':' ) [ 0 ] ) ; } return classes ; } export default extractClassesFromNgClass ;