UNPKG

jsonion

Version:

A lightweight JSON file-based database with nested data access and manipulation capabilities.

27 lines 1.14 kB
/** * Deep Access Extension for JSONion * Provides easy access to nested data structures */ declare module "./db.js" { interface db { getPath<T = any>(path: string): T | undefined; setPath(path: string, value: any): void; hasPath(path: string): boolean; deletePath(path: string): boolean; updatePath(path: string, value: any | ((oldValue: any) => any)): boolean; findDeep(key: string, value: any): Array<{ path: string; value: any; }>; pluckPath(path: string): any[]; findInPath(path: string, predicate: ((item: any) => boolean) | object): any[]; pushToPath(path: string, value: any): void; pullFromPath(path: string, predicate: (item: any) => boolean): number; updateInPath(arrayPath: string, findCondition: object | ((item: any) => boolean), updateData: object): boolean; mergePath(path: string, data: object): void; copyPath(sourcePath: string, destPath: string): void; movePath(sourcePath: string, destPath: string): void; } } export {}; //# sourceMappingURL=DeepAccess.d.ts.map