From 4149e2c8687f57f5d480aa473e00c6836a4a4f8f Mon Sep 17 00:00:00 2001 From: danbulant Date: Mon, 30 Dec 2019 20:40:22 +0100 Subject: [PATCH] Add utils --- html/utils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/html/utils.js b/html/utils.js index c801f2d..b0e6002 100644 --- a/html/utils.js +++ b/html/utils.js @@ -1,5 +1,9 @@ - +function removeChildNodes(node){ + while (node.firstChild) { + node.removeChild(node.firstChild); + } +} module.exports = { - + removeChildNodes } \ No newline at end of file