UNPKG

docorm

Version:

Persistence layer with ORM features for JSON documents

19 lines 1.01 kB
export type PropertyPathStr = string; export type PropertyPathArray = (string | number)[]; export type PropertyPath = PropertyPathStr | PropertyPathArray; export type JsonPathStr = string; export type JsonPointerStr = string; export type PathTransformer = (path: string) => { path: string; additionalOptions?: { [key: string]: any; }; }; export declare function jsonPathToPropertyPath(jsonPath: string): string; export declare function dottedPathToArray(path: PropertyPathStr): PropertyPathArray; export declare function pathDepth(path: PropertyPathStr): number; export declare function arrayToDottedPath(pathArray: PropertyPathArray): PropertyPathStr; export declare function shortenPath(path: PropertyPathStr, numComponentsToTrim: number): PropertyPathStr; export declare function tailPath(path: PropertyPathStr, numComponentsToTrim: number): PropertyPathStr; export declare function mapPaths<T>(x: T, transformPath: PathTransformer, visited?: any[]): T; //# sourceMappingURL=paths.d.ts.map