continuing, WIP

This commit is contained in:
theofficialomega
2025-07-16 15:19:12 +02:00
parent d8e4372f22
commit 6b3e17861a
9 changed files with 14 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
import { SiteConfig } from 'epg-grabber'
import { deepMerge } from '../functions/functions'
import { deepMerge } from '../functions'
import { pathToFileURL } from 'url'
export class ConfigLoader {

View File

@@ -11,8 +11,7 @@
* const uniqueItems = uniqBy(items, item => item.id);
* // uniqueItems will be [{ id: 1, name: 'A' }, { id: 2, name: 'B' }]
*/
export const uniqBy = <T, K>(arr: T[], fn: (item: T) => K): T[] =>
Array.from(new Map(arr.map(item => [fn(item), item])).values())
export const uniqBy = <T, K>(arr: T[], fn: (item: T) => K): T[] => [...new Map(arr.map(x => [fn(x), x])).values()]
/**
* Recursively merges multiple objects into a single object.

View File

@@ -0,0 +1 @@
export * from './functions'