@winglet/json
Version:
TypeScript library for safe and efficient JSON data manipulation with RFC 6901 (JSON Pointer) and RFC 6902 (JSON Patch) compliance, featuring prototype pollution protection and immutable operations
19 lines (18 loc) • 605 B
TypeScript
import type { JsonObject } from '../../../../type';
/**
* Merge the patch into the source object recursively
*
* @example
* ```typescript
* const source = { a: 1, b: 2 };
* const patch = { a: 3, c: 4 };
* const result = mergePatchRecursive(source, patch);
* // Returns: { a: 3, b: 2, c: 4 }
* ```
*
* @param source - The source object to be merged with the patch
* @param patch - The patch object to be applied to the source
* @returns The merged object
* @internal
*/
export declare const mergePatchRecursive: (source: JsonObject | undefined, patch: JsonObject | undefined) => JsonObject;