blob: 28accf8b6391bc4017ea866926a9f409d95f952d [file] [log] [blame] [edit]
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export default function clear(node) {
if (node) {
while (node.firstChild) {
node.removeChild(node.firstChild);
}
return node;
}
return null;
}