Avoid carousel init duplication.
This commit is contained in:
1 parent
c61ceb905d
commit
b4595867b3
4 files changed
+42
-16
No files matched your search
+7
-1
@@ -225,4 +225,10 @@ export const setOrRemoveAttribute = (
|
||||
/**
|
||||
* Allow typescript to narrow types based on truthy filter.
|
||||
*/
|
||||
export const filterTruthy = <T>(x: T | false | undefined | null | '' | 0): x is T => !!x;
|
||||
export const isTruthy = <T>(x: T | false | undefined | null | '' | 0): x is T => !!x;
|
||||
|
||||
/**
|
||||
* Allow typescript to narrow types for HTMLElements.
|
||||
*/
|
||||
export const isHTMLElement = (element: unknown): element is HTMLElement =>
|
||||
element instanceof HTMLElement;
|
||||
Reference in new issue
Block a user