[refactor] Moved 'clearObject' to its own TS file

This commit is contained in:
Steven Evans
2018-07-05 17:03:28 -04:00
parent bcc6d39b10
commit 7edf5b5f1a
4 changed files with 35 additions and 29 deletions
+1 -10
View File
@@ -1,14 +1,6 @@
//General helper functions
import {isString} from "./helpers/isString";
function clearObject(obj) {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
delete obj[key];
}
}
}
//Given an element by its Id(usually an 'a' element), removes all event listeners
//from that element by cloning and replacing. Then returns the new cloned element
function clearEventListeners(elemId) {
@@ -80,8 +72,7 @@ function clearSelector(selector) {
}
}
export {clearObject,
clearEventListeners,
export {clearEventListeners,
clearEventListenersEl,
removeElement,
createAccordionElement,