deepdash
Version:
➔ 𝐃eep standalone lib / 𝐋odash extension: ✓ eachDeep ✓ filterDeep ✓ mapDeep ✓ reduceDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parents stack ⋮ Circular check ⋮ Leaves only mode ⋮ Children mode ⋮ cherry-pick ⋮ esm
48 lines (46 loc) • 1.13 kB
TypeScript
import { Path } from "./Path";
import { IIterateeContext } from "./IIterateeContext";
export default function filterDeep(
obj: any,
predicate?: (
value: any,
key: string | number,
parentValue: any,
context: IIterateeContext
) =>
void
| boolean
| {
skipChildren: boolean;
cloneDeep: boolean;
keepIfEmpty: boolean;
},
options?: {
pathFormat?: "string" | "array"; // = "string";
checkCircular?: boolean; // = false;
keepCircular?: boolean; // = false;
childrenPath?: Path[];
includeRoot?: boolean;
leavesOnly?: boolean; // = false;
rootIsChildren?: boolean;
callbackAfterIterate?: boolean; // = false;
replaceCircularBy?: any;
condense?: boolean;
cloneDeep?: (value: any) => any;
onTrue?: {
skipChildren?: boolean;
cloneDeep?: boolean;
keepIfEmpty?: boolean;
};
onFalse?: {
skipChildren?: boolean;
cloneDeep?: boolean;
keepIfEmpty?: boolean;
};
onUndefined?: {
skipChildren?: boolean;
cloneDeep?: boolean;
keepIfEmpty?: boolean;
};
}
): any;