UNPKG

@energyweb/node-red-contrib-green-proof-worker

Version:
11 lines (10 loc) 585 B
export declare const groupBy: <T, K extends string, V>(array: T[], getKey: (item: T) => K, getValue: (item: T) => V) => Record<K, V>; export declare const diff: <T>(array: T[], otherArray: T[]) => T[]; export declare const partition: <T>(array: T[], condition: (v: T) => boolean) => [T[], T[]]; export declare const downloadAllGraphqlPages: <T>(params: { /** Query needs to accept $offset: Int and $limit: Int params */ query: string; variables: Record<string, string[] | string | number>; url: string | URL; mapResponse: (res: unknown) => T[]; }) => Promise<T[]>;