add dom events into support lib

This commit is contained in:
Rene
2020-11-12 23:55:06 +01:00
parent 84fbb436f9
commit 4987652d9d
9 changed files with 299 additions and 48 deletions
@@ -64,3 +64,11 @@ export const from = <T = any>(arr: ArrayLike<T>) => {
});
return result;
};
/**
* Calls all functions in the passed array of functions.
* @param arr The array filled with function which shall be called.
*/
export const runEach = (arr: Array<((...args: any) => any | any[]) | null | undefined>): void => {
each(arr, (fn) => fn && fn());
};