1// our input string to clean
2const stringToClean = 'Some text <b><i>with</i></b> <blink>tags</blink>, including a rogue script <script>alert(1)</script> def.';
3
4const result = new Sanitizer().sanitize(stringToClean);
5// Result: A DocumentFragment containing text nodes and a <b> element, with a <i> child element
6