jsm-utilities
Version:
A utilities library.
26 lines (25 loc) • 1.02 kB
TypeScript
import ObjectUpdatedProperties, { ObjectUpdatedPropertyObject } from './update-calculator.class';
export declare const transformObjectToString: (obj: any) => any;
/**
* @since 11-12-2023 15:41:03
*/
export declare const flattenObjectKeys: (obj: Record<string, any>, prefix?: string) => string[];
/**
* @since 11-12-2023 15:41:10
*/
export declare const flattenObject: (obj: Record<string, any>, prefix?: string) => Record<string, any>;
export declare const extractPartialObject: <D extends object, P extends keyof D>(obj: D, properties: P[]) => Pick<D, P>;
export declare function deletePropertyRecursively<T extends object, P extends keyof T>(obj: T, property: P): void;
/**
* Update : added
* @author dr. Salmi <reevosolutions@gmail.com>
* @since 18-07-2024 21:24:07
*/
export declare const unflattenObjectArray: <T extends {
_id: string;
parent: string | null;
children: string[];
}>(items: T[]) => (T & {
children: T[];
})[];
export { ObjectUpdatedProperties, ObjectUpdatedPropertyObject };