Skip to content

Commit

Permalink
chore: standalone clear implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed May 29, 2024
1 parent ba14270 commit a517c8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* Clear utility
*/

import remove from './remove';

/**
* Removes all children from the given element
*
Expand All @@ -14,7 +12,7 @@ export default function clear(element) {
var child;

while ((child = element.firstChild)) {
remove(child);
element.removeChild(child);
}

return element;
Expand Down

0 comments on commit a517c8b

Please sign in to comment.