// Small helper to avoid issues with includes and typescript // more infos: https://fettblog.eu/typescript-array-includes/ export function includes(array: ReadonlyArray, element: U): element is T { return array.includes(element as T); } //Avoid keyof while mapping with ObjectKeys //https://github.com/sindresorhus/ts-extras/blob/main/source/object-keys.ts#L24 export function objectKeysType(value: Type): Array { return Object.keys(value) as Array; } export function reverseRecord( input: Record, ): Record { return Object.fromEntries(Object.entries(input).map(([key, value]) => [value, key])); } export * from "./helpers/cryptoIconSize";