Added further utility functions

This commit is contained in:
squidfunk
2019-10-28 18:01:47 +01:00
parent 4e14ff285e
commit 5a90f92bb7
3 changed files with 19 additions and 2 deletions

View File

@@ -35,6 +35,6 @@
*/
export function toArray<
T extends HTMLElement
>(collection: HTMLCollection): T[] {
>(collection: HTMLCollection | NodeListOf<T>): T[] {
return Array.from(collection) as T[]
}