1 | ;
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports.default = clear;
|
5 |
|
6 | /**
|
7 | * Removes all child nodes from a given node.
|
8 | *
|
9 | * @param node the node to clear
|
10 | */
|
11 | function clear(node) {
|
12 | if (node) {
|
13 | while (node.firstChild) {
|
14 | node.removeChild(node.firstChild);
|
15 | }
|
16 |
|
17 | return node;
|
18 | }
|
19 |
|
20 | return null;
|
21 | }
|
22 |
|
23 | module.exports = exports["default"]; |
\ | No newline at end of file |