UNPKG

merge-change

Version:

Advanced library for deep merging, patching, and immutable updates of data structures. Features declarative operations for specific merging behaviors, property management, custom type merging rules, and difference tracking. Supports complex data transform

11 lines (10 loc) 794 B
/** * Checking properties in an object. Nested properties are specified using a path to them through separator * @param value Object to check, which should contain condition properties * @param condition Target object, all properties of which should be in value * @param data Data for substitution in the condition template. For example, '$session.user.name' in condition will be substituted with the value from data.session.user.name * @param separator Separator for templated value * @param errors If an array is passed, the names of properties that don't match will be added to it * @returns Whether the value matches the condition */ export declare function match(value: unknown, condition?: unknown, data?: Record<string, unknown>, separator?: string, errors?: string[]): boolean;