diff --git a/helpers/index.ts b/helpers/index.ts index 099bd28..9888c8e 100644 --- a/helpers/index.ts +++ b/helpers/index.ts @@ -6,7 +6,6 @@ export { default as wait } from './wait'; export { default as throwError } from './throwError'; export { default as selectInputElement } from './selectInputElement'; export { default as queryElement } from './queryElement'; -export { default as removeChildElements } from './removeChildElements'; export { default as isVisible } from './isVisible'; export { default as isScrollable } from './isScrollable'; export { default as getObjectKeys } from './getObjectKeys'; diff --git a/helpers/removeChildElements.ts b/helpers/removeChildElements.ts deleted file mode 100644 index b4110d0..0000000 --- a/helpers/removeChildElements.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Remove all child elements from a parent element - * @param element Parent element - * @param selector Optional: only remove the elements that match this selector - */ -const removeChildElements = (element: Element, selector?: string): void => { - const childElements = element.querySelectorAll(selector || '*'); - childElements.forEach((childElement) => childElement.remove()); -}; - -export default removeChildElements; diff --git a/package.json b/package.json index e8f204e..8694c13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@finsweet/ts-utils", - "version": "0.2.0", + "version": "0.1.1", "description": "Typescript utils for custom Webflow projects.", "main": "index.ts", "module": "index.ts",