const formatCVSS = ( vector ) : { [ key ] : string ; } => { const values = vector . split ( '/' ) ; const cvss = { } ; values . forEach ( ( metric ) => { const opt = metric . split ( ':' ) ; ( cvss as any ) [ opt [ 0 ] ] = opt [ 1 ] ; } ) ; return cvss ; } ; export default formatCVSS ;