simple-body-validator
Version:
This package is inspired by Laravel validation, and aims to make body validation easier for Javascript developers
26 lines (25 loc) • 893 B
TypeScript
import { GenericObject } from '../types';
/**
* Get value at path of object. If the resolved value is undifined, the returned result will be undefined
*/
export declare function deepFind(obj: object, path: string): any;
/**
* Set value at path of object.
*/
export declare function deepSet(target: any, path: string | string[], value: any): void;
/**
* Flatten a multi-dimensional associative array with dots.
*/
export declare function dotify(obj: object, ignoreRulesArray?: boolean, withBaseObjectType?: boolean): GenericObject;
/**
* Check if the value is an object
*/
export declare function isObject(value: any): boolean;
/**
* Deeply merge nested objects
*/
export declare function mergeDeep(target: any, source: any): any;
/**
* Check if objects are deep equal
*/
export declare function deepEqual(firstParam: object, secondParam: object): boolean;