UNPKG

abolish

Version:

A javascript object validator.

50 lines (49 loc) 1.49 kB
import type Abolish from "./Abolish"; /** * Change to string to upperFirst * @param str * @constructor */ export declare function abolish_UpperFirst(str: string): string; /** * abolish_StartCase * @param str * @param abolishInstance * @constructor */ export declare function abolish_StartCase(str: string, abolishInstance?: Abolish): string; /** * Pick keys from object * @param obj * @param keys * @param $hasDotFields */ export declare function abolish_Pick(obj: any, keys: string[], $hasDotFields?: boolean): Record<any, any>; export declare function abolish_Omit(obj: Record<string, any>, keys: string[]): Record<string, any>; /** * Abolish_Set * Because lodash is slow, we will only include it when there is a dot notation in the path. * @param obj * @param path * @param value * @param $hasDotNotation */ export declare function abolish_Set(obj: any, path: any, value: any, $hasDotNotation?: boolean): any; /** * Abolish_Get * Because lodash is slow, we will only include it when there is a dot notation in the path. * @param obj * @param path * @param $hasDotNotation */ export declare function abolish_Get(obj: any, path: string, $hasDotNotation?: boolean): any; /** * Check if a string has a dot notation * @param path */ export declare function hasDotNotation(path: string): boolean; /** * Instanceof * After running some tests with instanceof, we decided to use this instead. */ export declare function InstanceOf(type: Function, obj: any): boolean;