substitute multiple strings
const mapObj = {
'style="font-weight: 300;"': '',
}
function substiteStrings(str: string, mapObj: { [x: string]: string }) {
const exReg = new RegExp(Object.keys(mapObj).join('|'), 'gi')
return str.replace(exReg, function (matched: string) {
return mapObj[matched]
})
}