UNPKG

@comodinx/query-filters

Version:

@comodinx/query-filters is a module for parsing filters in string to object.

25 lines (24 loc) 934 B
/** * Check if the value is an object. */ export declare const isObject: (value: unknown) => boolean; /** * Check if the value is a symbol. */ export declare const isSymbol: (value: unknown) => boolean; /** * Check if the value is a function. */ export declare const isFunction: (value: unknown) => boolean; /** * For each the collection. */ export declare const each: <T>(collection: T | T[] | null | undefined, iterator: (item: T, i: string | number | symbol, collection: T | T[] | null | undefined) => void) => void; /** * Reduce the collection to a single value. */ export declare const reduce: <T, TResult>(collection: T | T[] | null | undefined, iterator: (carry: TResult, item: T, i: string | number | symbol, collection: T | T[] | null | undefined) => TResult, carry: TResult) => TResult; /** * Invert the keys and values of an object. */ export declare const invert: <T = any>(obj: T, multiValue?: boolean) => T;