chore: format small utility files
This commit is contained in:
@@ -13,4 +13,4 @@ export const qs = <T extends Element>(selector: string): T | null =>
|
|||||||
/**
|
/**
|
||||||
* Get a data attribute value from an element, defaults to empty string.
|
* Get a data attribute value from an element, defaults to empty string.
|
||||||
*/
|
*/
|
||||||
export const dataset = (el: HTMLElement, key: string): string => el.dataset[key] ?? '';
|
export const dataset = (el: HTMLElement, key: string): string => el.dataset[key] ?? "";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const parseClassList = (value: string | null): string[] => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return value
|
return value
|
||||||
.split(' ')
|
.split(" ")
|
||||||
.map((entry: string): string => entry.trim())
|
.map((entry: string): string => entry.trim())
|
||||||
.filter((entry: string): boolean => entry.length > 0);
|
.filter((entry: string): boolean => entry.length > 0);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user