feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -19,12 +19,12 @@
* If the path doesn't exist, undefined is returned.
*/
export function get<U = unknown>(object: object, path: string): U {
return path.split('.').reduce(
return path.split(".").reduce(
(accumulator, current) =>
accumulator?.hasOwnProperty(current)
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
(accumulator as any)[current]
: undefined,
object,
object
) as unknown as U;
}