@coralogix/browser
Version:
Official Coralogix SDK for browsers
36 lines (35 loc) • 1.85 kB
TypeScript
export declare function isObject(value: unknown): boolean;
type NestedKeyOf<ObjectType extends Record<string, any>> = {
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
}[keyof ObjectType & (string | number)];
/**
* Creates an object composed of the properties of the input object, excluding the specified paths.
*
* @param object The source object from which to omit properties.
* @param paths An array or a single path (including nested paths) to omit from the source object.
* @returns Returns a new object with the specified paths omitted.
*/
export declare function omit<const T extends Record<string, any>, const K extends string | NestedKeyOf<T>>(object?: T, ...paths: K[]): Omit<T, K> | Partial<T> | T;
/**
* Creates an object composed of the picked object properties, including support for nested paths.
*
* @param object The source object from which to pick properties.
* @param keys An array or a single key (including nested paths) to pick from the source object.
* @returns Returns a new object with properties picked from the source object.
*/
export declare function pick<const T extends Record<string, any>, const K extends string | NestedKeyOf<T>>(object?: T, ...keys: K[]): Pick<T, K> | Partial<T> | T;
/**
* Checks if a Set, Array, Map, or Object is empty.
*
* @param value - The value to check.
* @returns Returns true if the value is an empty Set, Map, Array, String or Object, else false.
*/
export declare function isEmpty(value: any): boolean;
/**
* Checks if a Set, Array, Map, or Object is not empty.
*
* @param value - The value to check.
* @returns Returns false if the value is an empty Set, Map, Array, String or Object, else true.
*/
export declare function isNotEmpty(value: any): boolean;
export {};