foxts
Version:
Opinionated collection of common TypeScript utils by @SukkaW
1 lines • 220 B
JavaScript
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}const t=e=>e.replaceChildren(),l="u">typeof Element&&"replaceChildren"in Element.prototype?t:e;export{l as emptyElement,t as emptyElementModern,e as emptyNode};