@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
18 lines • 790 B
TypeScript
/**
* getDeepestSplits will take an array of strings like an array of deep object keys and return the set of keys at particular depth.
* The point of the function is to get the deepest key of something like a deep object property for table heading labels for EasyAnalyticsHook.
*
* for instance deepKeys = [ 'a.b.c', 'w.x.y.z', '0.1.2.3.4.5' ] and assuming delim = '.'
*
* if idx === 0 : result: [ 'a','w','0' ]
* if idx === 1 : result: [ 'b','x','1' ]
* if idx === 2 : result: [ 'c','y','2' ]
* if idx === 97 : result: [ 'c','z','5' ]
*
* @param deepKeys
* @param delim
* @param idx
* @returns
*/
export declare function getDeepestSplits(deepKeys: string[], delim?: string, idx?: number): string[];
//# sourceMappingURL=getDeepKeys.d.ts.map