UNPKG

lodash-walk-object

Version:

Walk all properties deep in object with lodash help

78 lines (77 loc) 2.42 kB
// @ts-nocheck interface Circ { /** * This path value will be overriten with circural object value */ pathToObj: string; /** * lodash path to circural objects * OR * actual object for circural mapping */ circuralTargetPath: string | any; } interface Models__NS__InDBType { target: any; path: string; } interface Models__NS__Ver { v: any; p: string; parent: Models__NS__Ver; isGetter?: boolean; } interface Models__NS__StartIteratorOptions { walkGetters?: boolean; /** * Default in breadhTwalk */ checkCircural?: boolean; breadthWalk?: boolean; include?: string[]; exclude?: string[]; } interface Models__NS__AdditionalIteratorOptions extends Models__NS__StartIteratorOptions { skipObject?: () => void; isGetter?: boolean; /** * Breadth walk will skip content of circural objects */ isCircural?: boolean; exit?: () => void; } interface Models__NS__InternalValues extends Models__NS__AdditionalIteratorOptions { stack?: any[]; circural?: Circ[]; hasIterator?: boolean; _valueChanged: boolean; _skip: boolean; _exit: boolean; } type Iterator = (value: any, lodashPath: string, changeValueTo: (newValue: any) => void, options?: Models__NS__AdditionalIteratorOptions) => void; declare class Helpers { static get Walk(): { Object(json: Object, iterator: Iterator, optionsOrWalkGettersValue?: Models__NS__StartIteratorOptions): { circs: Circ[]; }; ObjectBy(property: string, inContext: Object, iterator: Iterator, options?: Models__NS__StartIteratorOptions): { circs: Circ[]; }; }; private static _changeValue; private static _prepareParams; private static get _Helpers(); private static _shoudlReturn; private static prepareOptions; private static _walk; } declare const walk: { Object: (json: Object, iterator: Iterator, optionsOrWalkGettersValue?: Models__NS__StartIteratorOptions) => { circs: Circ[]; }; ObjectBy: (property: string, inContext: Object, iterator: Iterator, options?: Models__NS__StartIteratorOptions) => { circs: Circ[]; }; }; export { Helpers, walk }; export type { Circ, Iterator, Models__NS__AdditionalIteratorOptions, Models__NS__InDBType, Models__NS__InternalValues, Models__NS__StartIteratorOptions, Models__NS__Ver };