I use
const clean = DOMpurify.sanitize(\'\',{ADD_TAGS:[\'myTag\']}
to get sure there are no XXS issues w