@formulier/core
Version:
Simple, performant form library
11 lines (10 loc) • 704 B
TypeScript
import clone from 'shallow-clone';
import isEqual from 'lodash.isequal';
declare function getPath(source: any, path: string | string[], fallback?: any): any;
declare function setPath(obj: any, path: string, value: any): any;
declare function setKey<T extends Record<string, unknown>>(source: T, key: string, value: unknown): T;
declare function removeKey<T extends Record<string, unknown>>(source: T, key: string): T;
declare function toPath(path: string | string[]): string[];
declare function isInteger(source: unknown): boolean;
declare function isObject(source: unknown): source is Record<string, unknown>;
export { clone, isEqual, getPath, setPath, setKey, removeKey, toPath, isInteger, isObject };